Commit baa9b1ca authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Remove optional reason-phrase from SPDY :status

parent 38443d21
...@@ -918,9 +918,7 @@ int SpdyUpstream::send_reply(Downstream *downstream, const uint8_t *body, ...@@ -918,9 +918,7 @@ int SpdyUpstream::send_reply(Downstream *downstream, const uint8_t *body,
const auto &resp = downstream->response(); const auto &resp = downstream->response();
auto &balloc = downstream->get_block_allocator(); auto &balloc = downstream->get_block_allocator();
auto status_line = concat_string_ref( auto status_line = http2::stringify_status(balloc, resp.http_status);
balloc, http2::stringify_status(balloc, resp.http_status),
StringRef::from_lit(" "), http2::get_reason_phrase(resp.http_status));
const auto &headers = resp.fs.headers(); const auto &headers = resp.fs.headers();
...@@ -1001,9 +999,7 @@ int SpdyUpstream::error_reply(Downstream *downstream, ...@@ -1001,9 +999,7 @@ int SpdyUpstream::error_reply(Downstream *downstream,
lgconf->update_tstamp(std::chrono::system_clock::now()); lgconf->update_tstamp(std::chrono::system_clock::now());
auto content_length = util::make_string_ref_uint(balloc, html.size()); auto content_length = util::make_string_ref_uint(balloc, html.size());
auto status_line = concat_string_ref( auto status_line = http2::stringify_status(balloc, status_code);
balloc, http2::stringify_status(balloc, status_code),
StringRef::from_lit(" "), http2::get_reason_phrase(status_code));
const char *nv[] = {":status", status_line.c_str(), const char *nv[] = {":status", status_line.c_str(),
":version", "http/1.1", ":version", "http/1.1",
...@@ -1108,9 +1104,8 @@ int SpdyUpstream::on_downstream_header_complete(Downstream *downstream) { ...@@ -1108,9 +1104,8 @@ int SpdyUpstream::on_downstream_header_complete(Downstream *downstream) {
size_t hdidx = 0; size_t hdidx = 0;
std::string via_value; std::string via_value;
auto status_line = concat_string_ref( auto status_line = http2::stringify_status(balloc, resp.http_status);
balloc, http2::stringify_status(balloc, resp.http_status),
StringRef::from_lit(" "), http2::get_reason_phrase(resp.http_status));
nv[hdidx++] = ":status"; nv[hdidx++] = ":status";
nv[hdidx++] = status_line.c_str(); nv[hdidx++] = status_line.c_str();
nv[hdidx++] = ":version"; nv[hdidx++] = ":version";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment