keep-alive over http proxy
FUJISHIMA Satsuki <[email protected]>
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
In commit log of http.c rev1.153:
> Don't use persistent connection over proxies.
but actual code is commented out. Because of this wget-1.10 does not
handle persistent connection over proxy very well; it hangs 60 seconds
between each retrieval.
$ export http_proxy=localhost:3128
$ /usr/bin/time ./src/wget -q www.apache.org
60.48 real 0.01 user 0.00 sys
$ /usr/bin/time ./src/wget -q --no-http-keep-alive www.apache.org
0.01 real 0.00 user 0.01 sys
$ /usr/bin/time ./src/wget -q --proxy=off www.apache.org
1.38 real 0.00 user 0.01 sys
fix:
uncomment proxy like below.
Index: src/http.c
===================================================================
RCS file: /pack/anoncvs/wget/src/http.c,v
retrieving revision 1.158
diff -u -r1.158 http.c
--- src/http.c 2005/04/14 21:12:57 1.158
+++ src/http.c 2005/04/16 01:24:14
@@ -1126,7 +1126,7 @@
causing it to not close the connection and leave both the proxy
and the client hanging. */
int inhibit_keep_alive =
- !opt.http_keep_alive || opt.ignore_length /*|| proxy != NULL*/;
+ !opt.http_keep_alive || opt.ignore_length || proxy != NULL;
/* Headers sent when using POST. */
wgint post_data_size = 0;