- "Host: %s\r\n",
- request_types[req_type],
- url->location, url->host);
+ "Host: %s%s%s%s%s\r\n",
+ request_types[req_type], url->location,
+ literal_ipv6 ? "[" : "",
+ url->host,
+ literal_ipv6 ? "]" : "",
+ url->port ? ":" : "",
+ url->port ? url->port : "");