Atwood, Robert C wrote:

Are you sure it is not the shell that is getting rid of multiple
slashes? is the argument place in single quotes?




-----Original Message-----
From: Victor Nazarov [mailto:[EMAIL PROTECTED] Sent: 13 July 2004 14:01
To: [EMAIL PROTECTED]
Subject: Multiple slashes compression



I've been using wget-1.9.1 and noticed that I'm unable to dounload some files from one server. I've tried lots of ways round modifing the HTTP request and using the -d option. And finally I've found the resone of failure. Wget compress multiple slashes in the url path into one. After this path modification http server tells that 302 Found. But with the original path everything is ok.
I think the problem is that wget simplify the path and use it in the HTTP request, and the solution will be to always use the original path for requests and to use simplified path for local operations (directories creation). This requires some reengeniering to be implemented. But please do it.


Yes I'm sure I've investigated the source. And quickly disabled it using #if 0:

--- wget-1.9.1.orig/src/url.c
+++ wget-1.9.1/src/url.c
@@ -1680,6 +1680,7 @@
           }
         h += 3;
       }
+#if 0
      else if (*h == '/')
       {
         /* Ignore empty path elements.  Supporting them well is hard
@@ -1690,6 +1691,7 @@
            would expect "x/z".  */
         ++h;
       }
+#endif
      else
       {
         /* A regular path element.  If H hasn't advanced past T,

Everithing now works fine, but I think there is an assumptation in the code that multiple slashes mustn't exists. So I propose to use to paths one for requests and one for everything else. Besides shell doesn't do anything with slashes ('/').

--
vir

Reply via email to