Loading src/httpd.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -742,8 +742,14 @@ void libhttppp::HttpEvent::_resumeH2Streams(HttpRequest &cureq, // advance and a permanently-stalled upstream spun forever. ++ss->emptyCount; if (ss->emptyCount > 500) { // Genuine stall — send END_STREAM out += h2BuildFrame(H2_FRAME_DATA, H2_FLAG_END_STREAM, sid, ""); // Genuine stall with the response short of the // advertised Content-Length. Sending END_STREAM here // would make the client accept a truncated body as // complete (e.g. a corrupted image). Abort the stream // instead so the client sees a failed transfer. uint8_t rst[4] = {0, 0, 0, 0x02}; // INTERNAL_ERROR out += h2BuildFrame(H2_FRAME_RST_STREAM, 0, sid, std::string(reinterpret_cast<char*>(rst), 4)); cureq.h2state().peerStreamWindows.erase(sid); streams.erase(it); } else { Loading Loading
src/httpd.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -742,8 +742,14 @@ void libhttppp::HttpEvent::_resumeH2Streams(HttpRequest &cureq, // advance and a permanently-stalled upstream spun forever. ++ss->emptyCount; if (ss->emptyCount > 500) { // Genuine stall — send END_STREAM out += h2BuildFrame(H2_FRAME_DATA, H2_FLAG_END_STREAM, sid, ""); // Genuine stall with the response short of the // advertised Content-Length. Sending END_STREAM here // would make the client accept a truncated body as // complete (e.g. a corrupted image). Abort the stream // instead so the client sees a failed transfer. uint8_t rst[4] = {0, 0, 0, 0x02}; // INTERNAL_ERROR out += h2BuildFrame(H2_FRAME_RST_STREAM, 0, sid, std::string(reinterpret_cast<char*>(rst), 4)); cureq.h2state().peerStreamWindows.erase(sid); streams.erase(it); } else { Loading