aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-06 16:43:50 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-06 16:43:50 -0400
commit9c957c4a0964ee1f5b0ff582543b9f526978c47e (patch)
tree2a411e2764a15fd947dd04edec3545160817606b
parentaf97440f3ef41ce88509397ada3c206fe63f9aa1 (diff)
downloadLR-87-9c957c4a0964ee1f5b0ff582543b9f526978c47e.tar.gz
LR-87-9c957c4a0964ee1f5b0ff582543b9f526978c47e.zip
Fixed URL handling when base url doesn't end in a slash
-rw-r--r--protocol.f906
1 files changed, 5 insertions, 1 deletions
diff --git a/protocol.f90 b/protocol.f90
index 087e96a..76fb8d4 100644
--- a/protocol.f90
+++ b/protocol.f90
@@ -143,7 +143,11 @@ contains
if(path(1:1) == "/") then
first_slash = index(current_url(past_protocol:len_trim(current_url)), "/")
- current_url = current_url(1:(past_protocol + first_slash - 1))//path(2:len_trim(path))
+ if(first_slash < 1) then
+ current_url = trim(current_url)//trim(path)
+ else
+ current_url = current_url(1:(past_protocol + first_slash - 1))//path(2:len_trim(path))
+ end if
else