nghttpx: Find illegal character in path for SPDY CONNECT method

This commit is contained in:
Tatsuhiro Tsujikawa 2017-03-25 19:09:19 +09:00
parent 19ee7ec794
commit 99122ee7bb
1 changed files with 4 additions and 2 deletions

View File

@ -261,9 +261,11 @@ void on_ctrl_recv_callback(spdylay_session *session, spdylay_frame_type type,
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 == '\\'; }) !=
std::end(host->value)) {
std::end(authority->value)) {
if (upstream->error_reply(downstream, 400) != 0) {
ULOG(FATAL, upstream) << "error_reply failed";
}