]> sjero.net Git - wget/commitdiff
[svn] Correctly handle URLs where / does not follow the host name.
authorhniksic <devnull@localhost>
Wed, 8 Nov 2000 09:15:40 +0000 (01:15 -0800)
committerhniksic <devnull@localhost>
Wed, 8 Nov 2000 09:15:40 +0000 (01:15 -0800)
Published in <sxsn1fag6zu.fsf@florida.arsdigita.de>.

src/ChangeLog
src/url.c

index ab60506e282ca1c081ce2bf1181600f4131bfa06..526bc19614c0ab78584fe9ad14a1fefc2ca59377 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * url.c (construct): Handle the case where host name is not
+       followed by a slash.
+
 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * init.c: commands[] need to be sorted!  ("base" wasn't.)
index 5095c444e900ef312ac7c01618a6827bc7522ce6..8be11f21bfbe805253e2e2233e861be12b1d4705 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1369,6 +1369,13 @@ construct (const char *url, const char *sub, int subsize, int no_proto)
              start_insert = end + 1;
              need_explicit_slash = 1;
            }
+         else if (last_slash && last_slash != url && last_slash[-1] == '/')
+           {
+             /* example: http://host"  */
+             /*                      ^ */
+             start_insert = end + 1;
+             need_explicit_slash = 1;
+           }
          else
            {
              /* example: "whatever/foo/bar" */