mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2 client: no point resetting ah
Resetting the ah and waiting a bit is the right strategy at the end of http/1.1 client transaction. But it's wrong for h2... drop the ah instead if it's the end of a client transaction on h2.
This commit is contained in:
parent
5b19db1850
commit
4f6fdd41b9
1 changed files with 11 additions and 2 deletions
|
@ -637,8 +637,17 @@ lws_http_transaction_completed_client(struct lws *wsi)
|
|||
|
||||
n = _lws_generic_transaction_completed_active_conn(wsi);
|
||||
|
||||
if (wsi->http.ah)
|
||||
_lws_header_table_reset(wsi->http.ah);
|
||||
if (wsi->http.ah) {
|
||||
if (wsi->client_h2_substream)
|
||||
/*
|
||||
* As an h2 client, once we did our transaction, that is
|
||||
* it for us. Further transactions will happen as new
|
||||
* SIDs on the connection.
|
||||
*/
|
||||
__lws_header_table_detach(wsi, 0);
|
||||
else
|
||||
_lws_header_table_reset(wsi->http.ah);
|
||||
}
|
||||
wsi->http.rx_content_length = 0;
|
||||
|
||||
if (!n || !wsi->http.ah)
|
||||
|
|
Loading…
Add table
Reference in a new issue