svn commit: trunk/busybox/networking
vda at busybox.net
vda at busybox.net
Wed Jan 3 14:29:02 PST 2007
Author: vda
Date: 2007-01-03 14:29:01 -0800 (Wed, 03 Jan 2007)
New Revision: 17149
Log:
wget: always print port# in 'Host' header (smaller code)
Modified:
trunk/busybox/networking/wget.c
Changeset:
Modified: trunk/busybox/networking/wget.c
===================================================================
--- trunk/busybox/networking/wget.c 2007-01-03 22:14:18 UTC (rev 17148)
+++ trunk/busybox/networking/wget.c 2007-01-03 22:29:01 UTC (rev 17149)
@@ -272,15 +272,8 @@
fprintf(sfp, "GET /%s HTTP/1.1\r\n", target.path);
}
- {
- const char *portstr = "";
- if (target.port != 80)
- portstr = xasprintf(":%d", target.port);
- fprintf(sfp, "Host: %s%s\r\nUser-Agent: %s\r\n",
- target.host, portstr, user_agent);
- if (ENABLE_FEATURE_CLEAN_UP && target.port != 80)
- free((char*)portstr);
- }
+ fprintf(sfp, "Host: %s:%u\r\nUser-Agent: %s\r\n",
+ target.host, target.port, user_agent);
#if ENABLE_FEATURE_WGET_AUTHENTICATION
if (target.user) {
More information about the busybox-cvs
mailing list