Loading modules/proxy/mod_proxy_http.c +13 −11 Changes for modules/proxy/mod_proxy_http.c: 13 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -1008,6 +1008,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, char *server_portstr) { conn_rec *c = r->connection; char buffer[HUGE_STRING_LEN]; const char *buf; char keepchar; request_rec *rp; apr_bucket *e; Loading Loading @@ -1113,9 +1114,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, r->status = HTTP_BAD_GATEWAY; r->status_line = "bad gateway"; return r->status; } else { const char *buf; } /* Now, add in the just read cookies */ apr_table_do(addit_dammit, save_table, r->headers_out, Loading @@ -1132,15 +1131,19 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* can't have both Content-Length and Transfer-Encoding */ if (apr_table_get(r->headers_out, "Transfer-Encoding") && apr_table_get(r->headers_out, "Content-Length")) { /* 2616 section 4.4, point 3: "if both Transfer-Encoding /* * 2616 section 4.4, point 3: "if both Transfer-Encoding * and Content-Length are received, the latter MUST be * ignored"; so unset it here to prevent any confusion * later. */ * ignored"; * * To help mitigate HTTP Splitting, unset Content-Length * and shut down the backend server connection * XXX: We aught to treat such a response as uncachable */ apr_table_unset(r->headers_out, "Content-Length"); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: server %s returned Transfer-Encoding and Content-Length", backend->hostname); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: server %s returned Transfer-Encoding" " and Content-Length", backend->hostname); backend->close += 1; } Loading @@ -1153,7 +1156,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, ap_set_content_type(r, apr_pstrdup(p, buf)); } ap_proxy_pre_http_request(origin,rp); } /* handle Via header in response */ if (conf->viaopt != via_off && conf->viaopt != via_block) { Loading Loading
modules/proxy/mod_proxy_http.c +13 −11 Changes for modules/proxy/mod_proxy_http.c: 13 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -1008,6 +1008,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, char *server_portstr) { conn_rec *c = r->connection; char buffer[HUGE_STRING_LEN]; const char *buf; char keepchar; request_rec *rp; apr_bucket *e; Loading Loading @@ -1113,9 +1114,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, r->status = HTTP_BAD_GATEWAY; r->status_line = "bad gateway"; return r->status; } else { const char *buf; } /* Now, add in the just read cookies */ apr_table_do(addit_dammit, save_table, r->headers_out, Loading @@ -1132,15 +1131,19 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* can't have both Content-Length and Transfer-Encoding */ if (apr_table_get(r->headers_out, "Transfer-Encoding") && apr_table_get(r->headers_out, "Content-Length")) { /* 2616 section 4.4, point 3: "if both Transfer-Encoding /* * 2616 section 4.4, point 3: "if both Transfer-Encoding * and Content-Length are received, the latter MUST be * ignored"; so unset it here to prevent any confusion * later. */ * ignored"; * * To help mitigate HTTP Splitting, unset Content-Length * and shut down the backend server connection * XXX: We aught to treat such a response as uncachable */ apr_table_unset(r->headers_out, "Content-Length"); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: server %s returned Transfer-Encoding and Content-Length", backend->hostname); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: server %s returned Transfer-Encoding" " and Content-Length", backend->hostname); backend->close += 1; } Loading @@ -1153,7 +1156,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, ap_set_content_type(r, apr_pstrdup(p, buf)); } ap_proxy_pre_http_request(origin,rp); } /* handle Via header in response */ if (conf->viaopt != via_off && conf->viaopt != via_block) { Loading