http module does not send host when proxied
http access module first attempts to connect to server using http/1.1 and then drops back to 1.0. But when it first connects it does not also send hostname header (although it does send the full URL).
1242 if( p_sys->b_proxy )
1243 {
1244 if( p_sys->url.psz_path )
1245 {
1246 net_Printf( p_access, p_sys->fd, NULL,
1247 "GET http://%s:%d%s HTTP/1.%d\r\n",
1248 p_sys->url.psz_host, p_sys->url.i_port,
1249 p_sys->url.psz_path, p_sys->i_version );
1250 }
1251 else
1252 {
1253 net_Printf( p_access, p_sys->fd, NULL,
1254 "GET http://%s:%d/ HTTP/1.%d\r\n",
1255 p_sys->url.psz_host, p_sys->url.i_port,
1256 p_sys->i_version );
1257 }
1258 }
I don't know about other servers, but Apache won't serve that up and returns a 400 error.
If I understand the spec properly, the request must have the hostname even if its a proxy server. see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23