Loading modules/proxy/proxy_ajp.c +8 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, const char *tenc; int havebody=1; int isok=1; apr_off_t bb_len; /* * Send the AJP request to the remote server Loading Loading @@ -192,6 +193,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, conn->worker->hostname); return HTTP_SERVICE_UNAVAILABLE; } conn->worker->s->transfered += bufsiz; } } Loading @@ -206,7 +208,6 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, conn->worker->hostname); return HTTP_SERVICE_UNAVAILABLE; } /* parse the reponse */ result = ajp_parse_type(r, conn->data); output_brigade = apr_brigade_create(p, r->connection->bucket_alloc); Loading Loading @@ -248,6 +249,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, "ajp_send_data_msg failed"); break; } conn->worker->s->transfered += bufsiz; } else { /* something is wrong TC asks for more body but we are * already at the end of the body data Loading Loading @@ -304,6 +306,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, result = ajp_parse_type(r, conn->data); } apr_brigade_destroy(input_brigade); apr_brigade_length(output_brigade, 0, &bb_len); if (bb_len != -1) conn->worker->s->readed += bb_len; if (!isok) apr_brigade_destroy(output_brigade); Loading modules/proxy/proxy_http.c +15 −6 Original line number Diff line number Diff line Loading @@ -250,6 +250,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, int counter, seen_eos, send_chunks; apr_status_t status; apr_bucket_brigade *header_brigade, *body_brigade, *input_brigade; apr_off_t transfered = 0; header_brigade = apr_brigade_create(p, origin->bucket_alloc); body_brigade = apr_brigade_create(p, origin->bucket_alloc); Loading Loading @@ -483,6 +484,10 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, e = apr_bucket_flush_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(header_brigade, e); apr_brigade_length(header_brigade, 0, &transfered); if (transfered != -1) conn->worker->s->transfered += transfered; conn->worker->s->transfered += transfered; if (send_chunks) { status = ap_pass_brigade(origin->output_filters, header_brigade); Loading Loading @@ -630,9 +635,11 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, conn->worker->cp->addr, conn->hostname); return status; } apr_brigade_length(body_brigade, 0, &transfered); if (transfered != -1) conn->worker->s->transfered += transfered; apr_brigade_cleanup(body_brigade); return APR_SUCCESS; } static void process_proxy_header(request_rec* r, proxy_server_conf* c, Loading Loading @@ -803,7 +810,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, * response. */ rp->proxyreq = PROXYREQ_RESPONSE; do { apr_brigade_cleanup(bb); Loading @@ -820,6 +826,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, return ap_proxyerror(r, HTTP_BAD_GATEWAY, "Error reading from remote server"); } /* XXX: Is this a real headers length send from remote? */ backend->worker->s->readed += len; /* Is it an HTTP/1 response? * This is buggy if we ever see an HTTP/1.10 Loading Loading @@ -1023,10 +1031,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, AP_MODE_READBYTES, APR_BLOCK_READ, conf->io_buffer_size) == APR_SUCCESS) { #if DEBUGGING { apr_off_t readbytes; apr_brigade_length(bb, 0, &readbytes); backend->worker->s->readed += readbytes; #if DEBUGGING { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy (PID %d): readbytes: %#x", getpid(), readbytes); Loading Loading
modules/proxy/proxy_ajp.c +8 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, const char *tenc; int havebody=1; int isok=1; apr_off_t bb_len; /* * Send the AJP request to the remote server Loading Loading @@ -192,6 +193,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, conn->worker->hostname); return HTTP_SERVICE_UNAVAILABLE; } conn->worker->s->transfered += bufsiz; } } Loading @@ -206,7 +208,6 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, conn->worker->hostname); return HTTP_SERVICE_UNAVAILABLE; } /* parse the reponse */ result = ajp_parse_type(r, conn->data); output_brigade = apr_brigade_create(p, r->connection->bucket_alloc); Loading Loading @@ -248,6 +249,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, "ajp_send_data_msg failed"); break; } conn->worker->s->transfered += bufsiz; } else { /* something is wrong TC asks for more body but we are * already at the end of the body data Loading Loading @@ -304,6 +306,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, result = ajp_parse_type(r, conn->data); } apr_brigade_destroy(input_brigade); apr_brigade_length(output_brigade, 0, &bb_len); if (bb_len != -1) conn->worker->s->readed += bb_len; if (!isok) apr_brigade_destroy(output_brigade); Loading
modules/proxy/proxy_http.c +15 −6 Original line number Diff line number Diff line Loading @@ -250,6 +250,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, int counter, seen_eos, send_chunks; apr_status_t status; apr_bucket_brigade *header_brigade, *body_brigade, *input_brigade; apr_off_t transfered = 0; header_brigade = apr_brigade_create(p, origin->bucket_alloc); body_brigade = apr_brigade_create(p, origin->bucket_alloc); Loading Loading @@ -483,6 +484,10 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, e = apr_bucket_flush_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(header_brigade, e); apr_brigade_length(header_brigade, 0, &transfered); if (transfered != -1) conn->worker->s->transfered += transfered; conn->worker->s->transfered += transfered; if (send_chunks) { status = ap_pass_brigade(origin->output_filters, header_brigade); Loading Loading @@ -630,9 +635,11 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, conn->worker->cp->addr, conn->hostname); return status; } apr_brigade_length(body_brigade, 0, &transfered); if (transfered != -1) conn->worker->s->transfered += transfered; apr_brigade_cleanup(body_brigade); return APR_SUCCESS; } static void process_proxy_header(request_rec* r, proxy_server_conf* c, Loading Loading @@ -803,7 +810,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, * response. */ rp->proxyreq = PROXYREQ_RESPONSE; do { apr_brigade_cleanup(bb); Loading @@ -820,6 +826,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, return ap_proxyerror(r, HTTP_BAD_GATEWAY, "Error reading from remote server"); } /* XXX: Is this a real headers length send from remote? */ backend->worker->s->readed += len; /* Is it an HTTP/1 response? * This is buggy if we ever see an HTTP/1.10 Loading Loading @@ -1023,10 +1031,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, AP_MODE_READBYTES, APR_BLOCK_READ, conf->io_buffer_size) == APR_SUCCESS) { #if DEBUGGING { apr_off_t readbytes; apr_brigade_length(bb, 0, &readbytes); backend->worker->s->readed += readbytes; #if DEBUGGING { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy (PID %d): readbytes: %#x", getpid(), readbytes); Loading