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 */
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;
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));
/* 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;