Permalink
Browse files

Update YaHTTP to v0.1.7

  • Loading branch information...
1 parent 5b09140 commit dc6c63d9c85827eade9e9779b4377e6371571064 @cmouse cmouse committed Aug 1, 2015
Showing with 4 additions and 2 deletions.
  1. +4 −2 pdns/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);

0 comments on commit dc6c63d

Please sign in to comment.