diff --git a/lib/core-net/service.c b/lib/core-net/service.c index 94fdaf090..d9f0202a1 100644 --- a/lib/core-net/service.c +++ b/lib/core-net/service.c @@ -252,7 +252,7 @@ __lws_service_timeout_check(struct lws *wsi, time_t sec) lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_TIMEOUTS, 1); /* no need to log normal idle keepalive timeout */ - if (wsi->pending_timeout != PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE) +// if (wsi->pending_timeout != PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE) #if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2) lwsl_info("wsi %p: TIMEDOUT WAITING on %d " "(did hdr %d, ah %p, wl %d, pfd " diff --git a/lib/roles/cgi/cgi-server.c b/lib/roles/cgi/cgi-server.c index 382b3c1fe..85d368618 100644 --- a/lib/roles/cgi/cgi-server.c +++ b/lib/roles/cgi/cgi-server.c @@ -550,7 +550,7 @@ LWS_VISIBLE LWS_EXTERN int lws_cgi_write_split_stdout_headers(struct lws *wsi) { int n, m, cmd; - unsigned char buf[LWS_PRE + 1024], *start = &buf[LWS_PRE], *p = start, + unsigned char buf[LWS_PRE + 4096], *start = &buf[LWS_PRE], *p = start, *end = &buf[sizeof(buf) - 1 - LWS_PRE], *name, *value = NULL; char c, hrs; @@ -941,6 +941,20 @@ agin: n += m + 2; } */ + +#if defined(LWS_WITH_HTTP2) + if (wsi->http2_substream) { + struct lws *nwsi = lws_get_network_wsi(wsi); + + __lws_set_timeout(wsi, + PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE, 31); + + if (!nwsi->immortal_substream_count) + __lws_set_timeout(nwsi, + PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE, 31); + } +#endif + cmd = LWS_WRITE_HTTP; if (wsi->http.cgi->content_length_seen + n == wsi->http.cgi->content_length)