From: Aki Tuomi Date: Sun, 27 Jul 2014 16:14:01 +0000 (+0300) Subject: YaHTTP upgrade X-Git-Tag: auth-3.4.0-rc1~18^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1637%2Fhead;p=thirdparty%2Fpdns.git YaHTTP upgrade --- diff --git a/pdns/ext/yahttp/yahttp/reqresp.cpp b/pdns/ext/yahttp/yahttp/reqresp.cpp index 9f12c54773..14196b998d 100644 --- a/pdns/ext/yahttp/yahttp/reqresp.cpp +++ b/pdns/ext/yahttp/yahttp/reqresp.cpp @@ -86,8 +86,8 @@ namespace YaHTTP { maxbody = minbody; } if (minbody < 1) return true; // guess there isn't anything left. - if (target->kind == YAHTTP_TYPE_REQUEST && minbody > target->max_request_size) throw ParseError("Max request body size exceeded"); - else if (target->kind == YAHTTP_TYPE_RESPONSE && minbody > target->max_response_size) throw ParseError("Max response body size exceeded"); + if (target->kind == YAHTTP_TYPE_REQUEST && static_cast(minbody) > target->max_request_size) throw ParseError("Max request body size exceeded"); + else if (target->kind == YAHTTP_TYPE_RESPONSE && static_cast(minbody) > target->max_response_size) throw ParseError("Max response body size exceeded"); } if (maxbody == 0) hasBody = false; diff --git a/pdns/ext/yahttp/yahttp/router.hpp b/pdns/ext/yahttp/yahttp/router.hpp index 1115af7d37..60bd21725d 100644 --- a/pdns/ext/yahttp/yahttp/router.hpp +++ b/pdns/ext/yahttp/yahttp/router.hpp @@ -34,9 +34,9 @@ namespace YaHTTP { This class implements a router for masked urls. The URL mask syntax is as of follows -//url/. +/<masked>/url<number>/<hi>.<format> -You can use <*param> to denote that everything will be matched and consumed into the parameter, including slash (/). Use <*> to denote that URL +You can use <*param> to denote that everything will be matched and consumed into the parameter, including slash (/). Use <*> to denote that URL is consumed but not stored. Note that only path is matched, scheme, host and url parameters are ignored. */ class Router { diff --git a/pdns/ext/yahttp/yahttp/utility.hpp b/pdns/ext/yahttp/yahttp/utility.hpp index 191ef24722..c6be7c6333 100644 --- a/pdns/ext/yahttp/yahttp/utility.hpp +++ b/pdns/ext/yahttp/yahttp/utility.hpp @@ -224,7 +224,7 @@ namespace YaHTTP { if (!std::isalnum(*iter) && (!asUrl || skip.find(*iter) == std::string::npos)) { // replace with different thing pos = std::distance(result.begin(), iter); - snprintf(repl,3,"%02x", static_cast(*iter)); + ::snprintf(repl,3,"%02x", static_cast(*iter)); result = result.replace(pos, 1, "%", 1).insert(pos+1, repl, 2); iter = result.begin() + pos + 2; }