You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2001/10/08 23:49:17 UTC
cvs commit: httpd-2.0/modules/proxy proxy_http.c proxy_util.c
ianh 01/10/08 14:49:17
Modified: modules/proxy proxy_http.c proxy_util.c
Log:
dechunking filter removed.
add HTTP_IN filter after the headers have been parsed.
so that the HTTP_IN can check them ;-)
Still not 100% if this works properly, but I don't get
the chunking numbers displayed on my browser,
so it's better than what was there.
Revision Changes Path
1.101 +4 -20 httpd-2.0/modules/proxy/proxy_http.c
Index: proxy_http.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- proxy_http.c 2001/10/08 19:25:35 1.100
+++ proxy_http.c 2001/10/08 21:49:17 1.101
@@ -699,6 +699,7 @@
if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
r->content_type = apr_pstrdup(p, buf);
}
+ ap_proxy_pre_http_request(origin,rp);
}
/* handle Via header in response */
@@ -793,29 +794,12 @@
const char *buf;
apr_off_t readbytes;
-
- /* if chunked - insert DECHUNK filter */
if (ap_proxy_liststr((buf = apr_table_get(r->headers_out,
"Transfer-Encoding")), "chunked")) {
- rp->read_chunked = 1;
- apr_table_unset(r->headers_out, "Transfer-Encoding");
- if ((buf = ap_proxy_removestr(r->pool, buf, "chunked"))) {
- apr_table_set(r->headers_out, "Transfer-Encoding", buf);
- }
- ap_add_input_filter("DECHUNK", NULL, rp, origin);
- readbytes = -1;
- }
- /* if content length - set the length to read */
- else if ((buf = apr_table_get(r->headers_out, "Content-Length"))) {
- readbytes = atol(buf);
- }
- /* no chunked / no length therefore read till EOF and
- * cancel keepalive
- */
- else {
- p_conn->close += 1;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ "proxy: Transfer-Encoding Chunked!");
+ apr_table_unset(r->headers_out,"Content-Length");
}
-
/* if keepalive cancelled, read to EOF */
if (p_conn->close) {
readbytes = -1;
1.70 +0 -2 httpd-2.0/modules/proxy/proxy_util.c
Index: proxy_util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- proxy_util.c 2001/10/08 19:25:35 1.69
+++ proxy_util.c 2001/10/08 21:49:17 1.70
@@ -377,7 +377,6 @@
rp->input_filters=NULL;
rp->output_filters = c->output_filters;
rp->input_filters = c->input_filters;
- ap_proxy_pre_http_request(c,rp);
rp->request_config = ap_create_request_config(c->pool);
req_cfg = apr_pcalloc(rp->pool, sizeof(core_request_config));
@@ -981,7 +980,6 @@
/* set up the minimal filter set */
PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c)
{
-// ap_add_input_filter("HTTP_IN", NULL, r, c);
ap_add_input_filter("CORE_IN", NULL, NULL, c);
ap_add_output_filter("CORE", NULL, NULL, c);
return OK;