shrpx: Create absoluteURI only when path starts with '/'

This commit is contained in:
Tatsuhiro Tsujikawa 2012-07-14 17:36:55 +09:00
parent 3fc0e4dd6b
commit 17699b1fdf
1 changed files with 1 additions and 2 deletions

View File

@ -169,8 +169,7 @@ void on_ctrl_recv_callback
upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
return;
}
if(get_config()->spdy_proxy && scheme &&
!util::istartsWith(path, scheme)) {
if(get_config()->spdy_proxy && scheme && path[0] == '/') {
std::string reqpath = scheme;
reqpath += "://";
reqpath += host;