← Commit list

a8951cbc3

Denis Vlasenko
Denis Vlasenko
2007-01-03
FAILED Duration: 3s

Subject

wget: always print port# in 'Host' header (smaller code)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/wget.c+2 -9
@@ -272,15 +272,8 @@ int wget_main(int argc, char **argv)
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) {