From a47feb22cb5455cc413656793a0b3559c372f8bc Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 12 Jul 2012 23:44:30 +0900 Subject: [PATCH] Don't prepend scheme and host to path if path starts with scheme. This is just a sanity check in caes of path contains absoluteURI. --- examples/shrpx_spdy_upstream.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/shrpx_spdy_upstream.cc b/examples/shrpx_spdy_upstream.cc index ee6fdf14..2f8a0759 100644 --- a/examples/shrpx_spdy_upstream.cc +++ b/examples/shrpx_spdy_upstream.cc @@ -169,7 +169,8 @@ void on_ctrl_recv_callback upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR); return; } - if(get_config()->spdy_proxy && scheme) { + if(get_config()->spdy_proxy && scheme && + !util::istartsWith(path, scheme)) { std::string reqpath = scheme; reqpath += "://"; reqpath += host;