Skip to content

Commit

Permalink
fix extra null byte in http response header
Browse files Browse the repository at this point in the history
Signed-off-by: liulanzheng <[email protected]>
  • Loading branch information
liulanzheng authored and beef9999 committed Aug 14, 2024
1 parent e62865a commit 5ba5018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/http/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.

struct SV : public std::string_view {
template<size_t N>
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) { }
};

Expand Down

0 comments on commit 5ba5018

Please sign in to comment.