don't replace plus with space in headers (#649)

* don't replace plus with space in headers

* fixed forward handling with changed header parsing

* add test for boundaries containing plus chars
This commit is contained in:
tmahring
2020-09-10 20:27:01 -04:00
committed by GitHub
parent 308aeb187b
commit e9575bcb78
2 changed files with 37 additions and 2 deletions
+2 -2
View File
@@ -2464,7 +2464,7 @@ inline bool parse_header(const char *beg, const char *end, T fn) {
}
if (p < end) {
fn(std::string(beg, key_end), decode_url(std::string(p, end), true));
fn(std::string(beg, key_end), decode_url(std::string(p, end), false));
return true;
}
@@ -4768,7 +4768,7 @@ inline bool ClientImpl::redirect(const Request &req, Response &res) {
return false;
}
auto location = res.get_header_value("location");
auto location = detail::decode_url(res.get_header_value("location"), true);
if (location.empty()) { return false; }
const static std::regex re(