mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ah pool take care about freeing headers after parsing
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
1b89b933a6
commit
99e876d8f7
1 changed files with 10 additions and 2 deletions
12
lib/server.c
12
lib/server.c
|
@ -304,8 +304,16 @@ lws_http_action(struct lws *wsi)
|
|||
wsi->user_space, uri_ptr, uri_len);
|
||||
}
|
||||
|
||||
/* now drop the header info we kept a pointer to */
|
||||
lws_free_header_table(wsi);
|
||||
/*
|
||||
* If we are in keepalive, we may already have the next header set
|
||||
* pipelined in the lws_read buffer above us... if so, we must hold
|
||||
* the ah so it's still bound when we want to process the next headers.
|
||||
*
|
||||
*/
|
||||
if (connection_type == HTTP_CONNECTION_CLOSE ||
|
||||
!wsi->u.hdr.more_rx_waiting)
|
||||
/* now drop the header info we kept a pointer to */
|
||||
lws_free_header_table(wsi);
|
||||
|
||||
if (n) {
|
||||
lwsl_info("LWS_CALLBACK_HTTP closing\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue