From de147716e978e07901f6e03d36768cea8bd5034c Mon Sep 17 00:00:00 2001 From: liulanzheng Date: Tue, 13 Aug 2024 21:04:29 +0800 Subject: [PATCH] fix extra null byte in http response header Signed-off-by: liulanzheng --- net/http/status.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/http/status.cpp b/net/http/status.cpp index 849474fc..5c9b67d6 100644 --- a/net/http/status.cpp +++ b/net/http/status.cpp @@ -19,7 +19,7 @@ limitations under the License. struct SV : public std::string_view { template - constexpr SV(const char(&s)[N]) : SV(s, N) { } + constexpr SV(const char(&s)[N]) : SV(s, N-1) { } constexpr SV(const char* s, size_t n) : std::string_view(s, n) { } };