Commit 99122ee7 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Find illegal character in path for SPDY CONNECT method

parent 19ee7ec7
...@@ -261,9 +261,11 @@ void on_ctrl_recv_callback(spdylay_session *session, spdylay_frame_type type, ...@@ -261,9 +261,11 @@ void on_ctrl_recv_callback(spdylay_session *session, spdylay_frame_type type,
return; return;
} }
if (std::find_if(std::begin(host->value), std::end(host->value), auto authority = is_connect ? path : host;
if (std::find_if(std::begin(authority->value), std::end(authority->value),
[](char c) { return c == '"' || c == '\\'; }) != [](char c) { return c == '"' || c == '\\'; }) !=
std::end(host->value)) { std::end(authority->value)) {
if (upstream->error_reply(downstream, 400) != 0) { if (upstream->error_reply(downstream, 400) != 0) {
ULOG(FATAL, upstream) << "error_reply failed"; ULOG(FATAL, upstream) << "error_reply failed";
} }
......
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