sepstring() doesn't handle trailing ','
Wolfhard Strähle <[email protected]> Fri, 10 Jun 2005 16:55:05 +0200
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Organization | Gebr. Heller GmbH. |
| Message-ID | <[email protected]> |
Hi,
I spent a hard time figuring out why wget never did use the proxy specified in
my /etc/wgetrc. Finally I noticed, that the 'no_proxy' variable in the
environment had a trailing ',' which is used as separator between multiple
entries.
This resulted in an empty entry in the list of no-proxy hosts created by
sepstring(). The backward matching performed in sufmatch() positively matches
a zero length entry against any compare string so that the specified proxy
was ignored for every host I called.
This is not really a bug, but it won't hurt, if wget would handle such a case
more gracefully. The following patch should solve it:
--- src/utils.c.orig 2005-06-10 16:13:37.000000000 +0200
+++ src/utils.c 2005-06-10 16:14:28.000000000 +0200
@@ -157,6 +157,8 @@
/* Skip the blanks following the ','. */
while (ISSPACE (*s))
++s;
+ if ( !*s ) /* ignore trailing separator */
+ break;
p = s;
}
else
Thanks to Mauro and Hrvoje for their great work. I just downloaded wget 1.10
and I'm very happy with it.
Best regards
Wolfhard
The information contained in this email is intended solely for the addressee. If you are not the intended recipient or his representative, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. All statements of opinion or advice directed via this email to the addressee are subject to the regulations expressed in the quotation or order and, in particular, in the general order terms and conditions and in the individual liability agreement. The content of this email is not legally binding unless confirmed by letter. The sending of emails to us will not constitute compliance with any time limits or deadlines. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate em
ails. For this reason we will not send any confidential information via email over the internet.
----------------------------------------------------------------------
This message has been checked for all known viruses by e:)scan.
For further information please contact the postmaster:
mailto:[email protected]