From 71012fe83a9ab4f8ea8c4247f7b3cce4e1f96684 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 15 Dec 2015 22:47:05 +0900 Subject: [PATCH] nghttpx: Add constexpr --- src/shrpx_client_handler.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 8ace9d4a..9e70e457 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -729,10 +729,11 @@ int ClientHandler::perform_http2_upgrade(HttpsUpstream *http) { on_read_ = &ClientHandler::upstream_http2_connhd_read; write_ = &ClientHandler::write_clear; - static char res[] = "HTTP/1.1 101 Switching Protocols\r\n" - "Connection: Upgrade\r\n" - "Upgrade: " NGHTTP2_CLEARTEXT_PROTO_VERSION_ID "\r\n" - "\r\n"; + static constexpr char res[] = + "HTTP/1.1 101 Switching Protocols\r\n" + "Connection: Upgrade\r\n" + "Upgrade: " NGHTTP2_CLEARTEXT_PROTO_VERSION_ID "\r\n" + "\r\n"; upstream->get_response_buf()->write(res, sizeof(res) - 1); upstream_ = std::move(upstream);