From: Aki Tuomi Date: Sat, 1 Aug 2015 03:39:40 +0000 (+0300) Subject: Update YaHTTP to v0.1.7 X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe4267c77573f2fb6ac50a1dd620d80504238f62;p=thirdparty%2Fpdns.git Update YaHTTP to v0.1.7 --- diff --git a/ext/yahttp/yahttp/reqresp.cpp b/ext/yahttp/yahttp/reqresp.cpp index eee72804bf..3dd78483fb 100644 --- a/ext/yahttp/yahttp/reqresp.cpp +++ b/ext/yahttp/yahttp/reqresp.cpp @@ -172,8 +172,10 @@ namespace YaHTTP { for(strstr_map_t::const_iterator i = getvars.begin(); i != getvars.end(); i++) { getparmbuf << Utility::encodeURL(i->first, false) << "=" << Utility::encodeURL(i->second, false) << "&"; } - if (getparmbuf.str().length() > 0) - getparms = "?" + std::string(getparmbuf.str().begin(), getparmbuf.str().end() - 1); + if (getparmbuf.str().length() > 0) { + std::string buf = getparmbuf.str(); + getparms = "?" + std::string(buf.begin(), buf.end() - 1); + } else getparms = ""; os << method << " " << url.path << getparms << " HTTP/" << versionStr(this->version);