From 17cd64fd15514b7a5b994718a9833e737a668137 Mon Sep 17 00:00:00 2001 From: "Eduardo Ramos Testillano (ert)" Date: Sat, 9 Jul 2022 21:51:03 +0200 Subject: [PATCH] Turn ignoreRequestBody into no-const method As nghttp2 req is passed, it is probable that user implementation, analyzes data and indexes processing on server cache for further stage (receive()). Thus, once ignored (or not) the request body received, the thing is that receive() could be not repeating again same processing of received data. --- include/ert/http2comm/Http2Server.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ert/http2comm/Http2Server.hpp b/include/ert/http2comm/Http2Server.hpp index ea36660..b1509ea 100644 --- a/include/ert/http2comm/Http2Server.hpp +++ b/include/ert/http2comm/Http2Server.hpp @@ -203,7 +203,7 @@ class Http2Server * * @return Return the boolean about ignoring request body copy. Default implementation returns 'false'. */ - virtual bool ignoreRequestBody(const nghttp2::asio_http2::server::request& req) const { + virtual bool ignoreRequestBody(const nghttp2::asio_http2::server::request& req) { return false; }