Bug #2196
closedmod_proxy caching data
Description
Hi..
lighttpd version 1.4.26.
mod_proxy does not forward response until socket connection is closed with host proxy (it simply caches the data).
I did a fix but 'm not very sure how much generalized/stable it is (it is working fine in my scenario).
Please have a look at it & if the fix seems fine then a patch can be released.
The file is attached for reference.
==========================================================
CHANGES:
1.
function: static int proxy_demux_response(server *srv, handler_ctx *hctx)
change:
//PATCH ADDED FOR SENDING RESPONSE DATA.
//Check for Content-Length tag & data received is equal to Content-Length
if((con->parsed_response & HTTP_CONTENT_LENGTH) && (con->response.content_length == blen))
hctx->response->used = 0;
2. static handler_t proxy_write_request(server *srv, handler_ctx *hctx)
change:
case PROXY_STATE_READ:
//PATCH ADDED FOR SENDING RESPONSE DATA.
//IF ALL RESPONSE DATA IS READ SUCCESSFULLY.
if(hctx->response->used 0)
return HANDLER_GO_ON ;
else
/* waiting for a response */
return HANDLER_WAIT_FOR_EVENT;
3. SUBREQUEST_FUNC(mod_proxy_handle_subrequest)
change:
//PATCH ADDED FOR SENDING RESPONSE DATA.
case HANDLER_GO_ON:
return HANDLER_GO_ON;
Regards,
~Nishant
Files
Updated by stbuehler over 14 years ago
- Target version changed from 1.4.x to 1.4.27
Updated by stbuehler over 14 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2756.
Also available in: Atom