mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
http: post: defer body pending end until no more buffered out
This commit is contained in:
parent
ae0b52c0df
commit
ffb49e2612
2 changed files with 4 additions and 4 deletions
|
@ -2538,7 +2538,7 @@ lws_h2_client_handshake(struct lws *wsi)
|
|||
/* below is not needed in spec, indeed it destroys the long poll
|
||||
* feature, but required by nghttp2 */
|
||||
if ((wsi->flags & LCCSCF_H2_QUIRK_NGHTTP2_END_STREAM) &&
|
||||
!(wsi->client_http_body_pending))
|
||||
!(wsi->client_http_body_pending || lws_has_buffered_out(wsi)))
|
||||
m |= LWS_WRITE_H2_STREAM_END;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ hs2:
|
|||
break;
|
||||
}
|
||||
|
||||
if (wsi->client_http_body_pending) {
|
||||
if (wsi->client_http_body_pending || lws_has_buffered_out(wsi)) {
|
||||
lwsl_debug("body pending\n");
|
||||
lwsi_set_state(wsi, LRS_ISSUE_HTTP_BODY);
|
||||
lws_set_timeout(wsi,
|
||||
|
@ -332,7 +332,7 @@ hs2:
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
if (wsi->client_http_body_pending) {
|
||||
if (wsi->client_http_body_pending || lws_has_buffered_out(wsi)) {
|
||||
//lws_set_timeout(wsi,
|
||||
// PENDING_TIMEOUT_CLIENT_ISSUE_PAYLOAD,
|
||||
// context->timeout_secs);
|
||||
|
@ -1216,7 +1216,7 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
|
|||
|
||||
p += lws_snprintf(p, lws_ptr_diff_size_t(end, p), "\x0d\x0a");
|
||||
|
||||
if (wsi->client_http_body_pending)
|
||||
if (wsi->client_http_body_pending || lws_has_buffered_out(wsi))
|
||||
lws_callback_on_writable(wsi);
|
||||
|
||||
lws_metrics_caliper_bind(wsi->cal_conn, wsi->a.context->mt_http_txn);
|
||||
|
|
Loading…
Add table
Reference in a new issue