diff --git a/src/proxy.c b/src/proxy.c index ad76100..1a72120 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -13,49 +13,49 @@ char * proxy_stringtable[] = { /* 0 */ "HTTP/1.0 400 Bad Request\r\n" - "Proxy-Connection: close\r\n" + "Connection: close\r\n" "Content-type: text/html; charset=utf-8\r\n" "\r\n" "
", /* 15*/ "HTTP/1.0 503 Service Unavailable\r\n" - "Proxy-Connection: close\r\n" + "Connection: close\r\n" "Content-type: text/html; charset=utf-8\r\n" "\r\n" "503 Service Unavailable \r\n" @@ -119,7 +119,7 @@ char * proxy_stringtable[] = { /* 16*/ "HTTP/1.0 401 Authentication Required\r\n" "WWW-Authenticate: basic realm=\"FTP Server\"\r\n" - "Proxy-Connection: close\r\n" + "Connection: close\r\n" "Content-type: text/html; charset=utf-8\r\n" "\r\n" "401 FTP Server requires authentication \r\n" @@ -786,7 +786,7 @@ for(;;){ sprintf(ftpbuf, "HTTP/1.0 200 OK\r\n" "Content-Type: text/html\r\n" - "Proxy-Connection: keep-alive\r\n" + "Connection: keep-alive\r\n" "Content-Length: %d\r\n\r\n", inbuf); socksend(param->clisock, (unsigned char *)ftpbuf, (int)strlen(ftpbuf), conf.timeouts[STRING_S]); @@ -847,7 +847,9 @@ for(;;){ sprintf((char*)buf+strlen((char *)buf), "\r\n"); } #endif - if(keepalive <= 1) sprintf((char*)buf+strlen((char *)buf), "%s: %s\r\n", (param->redirtype == R_HTTP)?"Proxy-Connection":"Connection", keepalive? "keep-alive":"close"); + if(keepalive <= 1) { + sprintf((char*)buf+strlen((char *)buf), "Connection: %s\r\n", keepalive? "keep-alive":"close"); + } if(param->extusername){ sprintf((char*)buf + strlen((char *)buf), "%s: basic ", (redirect)?"Proxy-Authorization":"Authorization"); sprintf((char*)username, "%.128s:%.128s", param->extusername, param->extpassword?param->extpassword:(unsigned char*)""); @@ -992,9 +994,7 @@ for(;;){ ); if(!param->srv->transparent){ if(ckeepalive <= 1) sprintf((char*)buf+strlen((char *)buf), "Connection: %s\r\n", - (hascontent && ckeepalive)?"Keep-Alive":"Close"); - if(!param->transparent)sprintf((char*)buf+strlen((char *)buf), "Proxy-Connection: %s\r\n", - (hascontent && ckeepalive)?"Keep-Alive":"Close"); + (hascontent && ckeepalive)?"keep-alive":"close"); } sprintf((char*)buf + strlen((char *)buf), "\r\n"); if((socksend(param->clisock, buf, (int)strlen((char *)buf), conf.timeouts[STRING_S])) != (int)strlen((char *)buf)) {