@@ -38,6 +38,7 @@ namespace headers {
3838
3939inline constexpr std::string_view HOST = " host" ;
4040inline constexpr std::string_view COOKIE = " cookie" ;
41+ inline constexpr std::string_view SERVER = " server" ;
4142inline constexpr std::string_view LOCATION = " location" ;
4243inline constexpr std::string_view SET_COOKIE = " set-cookie" ;
4344inline constexpr std::string_view CONNECTION = " connection" ;
@@ -46,7 +47,6 @@ inline constexpr std::string_view CONTENT_LENGTH = "content-length";
4647inline constexpr std::string_view AUTHORIZATION = " authorization" ;
4748inline constexpr std::string_view ACCEPT_ENCODING = " accept-encoding" ;
4849inline constexpr std::string_view CONTENT_ENCODING = " content-encoding" ;
49- inline constexpr std::string_view SERVER = " server" ;
5050
5151} // namespace headers
5252
@@ -74,20 +74,8 @@ struct HttpServerInstanceState final : private vk::not_copyable {
7474 kphp::stl::multimap<kphp::stl::string<kphp::memory::script_allocator>, kphp::stl::string<kphp::memory::script_allocator>, kphp::memory::script_allocator>
7575 headers_;
7676
77- // Setup default headers
78- void headers_init () noexcept {
79- constexpr std::string_view DEFAULT_SERVER_NAME = " nginx/0.3.33" ;
80- constexpr std::string_view DEFAULT_CONTENT_TYPE = " text/html; charset=windows-1251" ;
81- // add 'server' header
82- add_header (kphp::http::headers::SERVER, DEFAULT_SERVER_NAME, false );
83- // add 'content-type' header
84- add_header (kphp::http::headers::CONTENT_TYPE, DEFAULT_CONTENT_TYPE, false );
85- }
86-
8777public:
88- HttpServerInstanceState () noexcept {
89- headers_init ();
90- }
78+ HttpServerInstanceState () noexcept = default ;
9179
9280 const auto & headers () const noexcept {
9381 return headers_;
0 commit comments