Too waste memory in mod_proxy.c
ASK QUESTIONS IN Forums:
static int proxy_demux_response(server *srv, handler_ctx *hctx)
lien 655: buffer_prepare_append(hctx->response, hctx->response->used + b);
Too waste memory.
int buffer_prepare_append(buffer *b, size_t size) expands the content of the buffer, not set. The argument size is a "incremental" quantity, not the "absolute" quantity. See the srouce.
So line 655 should be changed to:
I have had a test, and it works OK.
Updated by icy over 14 years ago
- Target version set to 1.4.21
- Pending changed from No to Yes
Looked over it and is valid, good find.
Thanks for looking over the source ycheng!
Updated by stbuehler over 14 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2365.
Also available in: Atom