]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
YaHTTP upgrade 1637/head
authorAki Tuomi <cmouse@desteem.org>
Sun, 27 Jul 2014 16:14:01 +0000 (19:14 +0300)
committerAki Tuomi <cmouse@desteem.org>
Sun, 27 Jul 2014 16:14:36 +0000 (19:14 +0300)
pdns/ext/yahttp/yahttp/reqresp.cpp
pdns/ext/yahttp/yahttp/router.hpp
pdns/ext/yahttp/yahttp/utility.hpp

index 9f12c54773a6ead6d9604c1c7dcf6356c3fa7fca..14196b998dcf30e710590a42e3887e272e105304 100644 (file)
@@ -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<ssize_t>(minbody) > target->max_request_size) throw ParseError("Max request body size exceeded");
+      else if (target->kind == YAHTTP_TYPE_RESPONSE && static_cast<ssize_t>(minbody) > target->max_response_size) throw ParseError("Max response body size exceeded");
     }
 
     if (maxbody == 0) hasBody = false;
index 1115af7d37078313784d9b96031c0e2bb4e79c95..60bd21725dd8c8f56e43e723ee72809cb4845e70 100644 (file)
@@ -34,9 +34,9 @@ namespace YaHTTP {
 
 This class implements a router for masked urls. The URL mask syntax is as of follows
 
-/<masked>/url<number>/<hi>.<format>
+/&lt;masked&gt;/url&lt;number&gt;/&lt;hi&gt;.&lt;format&gt;
 
-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 &lt;*param&gt; to denote that everything will be matched and consumed into the parameter, including slash (/). Use &lt;*&gt; to denote that URL 
 is consumed but not stored. Note that only path is matched, scheme, host and url parameters are ignored. 
    */
   class Router {
index 191ef247223e5a21fb78f832aa370f504b761852..c6be7c6333c638e420b0c01088d4323dad80b816 100644 (file)
@@ -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<unsigned char>(*iter));
+          ::snprintf(repl,3,"%02x", static_cast<unsigned char>(*iter));
           result = result.replace(pos, 1, "%", 1).insert(pos+1, repl, 2);
           iter = result.begin() + pos + 2;
         }