]> granicus.if.org Git - pdns/commitdiff
Resync yahttp code to cmouse/yahttp@11be77a1fc4032ed268cb5a80eb2aa1d14ce849d
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 30 Jan 2019 10:12:21 +0000 (11:12 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 30 Jan 2019 10:12:21 +0000 (11:12 +0100)
ext/yahttp/README.md
ext/yahttp/yahttp/exception.hpp
ext/yahttp/yahttp/reqresp.cpp
ext/yahttp/yahttp/router.hpp
ext/yahttp/yahttp/url.hpp
ext/yahttp/yahttp/utility.hpp

index 7cd9e3562c354eaa8515af6a5096749c2a5bf55b..86794b53430a3ef3261d93e8413b00697efc5b4e 100644 (file)
@@ -5,7 +5,7 @@ YaHTTP aims to be a pure http request/response parser that has no IO ties. It is
 
 [![Build Status](https://travis-ci.org/cmouse/yahttp.svg?branch=master)](https://travis-ci.org/cmouse/yahttp)
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/2161/badge.svg)](https://scan.coverity.com/projects/2161)
-[![Coverage Status](https://coveralls.io/repos/cmouse/yahttp/badge.svg?branch=master%0A)](https://coveralls.io/r/cmouse/yahttp?branch=master%0A)
+[![Coverage Status](https://coveralls.io/repos/github/cmouse/yahttp/badge.svg)](https://coveralls.io/github/cmouse/yahttp)
 
 WARNINGS
 --------
index 72a048a328c187405f729257f4a3ee37f1cf3862..d0ea0fea2dbb36f7835fd814f1e4f3164a2e7555 100644 (file)
@@ -1,6 +1,4 @@
-#ifndef _YAHTTP_EXCEPTION_HPP 
-#define _YAHTTP_EXCEPTION_HPP 1
-
+#pragma once
 #include <exception>
 
 namespace YaHTTP {
@@ -24,5 +22,3 @@ namespace YaHTTP {
     ParseError(const std::string& reason_): Error(reason_) {};
   };
 };
-
-#endif
index 92fc6480a7e6a88bca2407b60510604467bc2661..beeb4d50204594254fde8d201bec15b2aa03bf6c 100644 (file)
@@ -262,7 +262,7 @@ namespace YaHTTP {
             os << "; ";
           os << Utility::encodeURL(i->second.name) << "=" << Utility::encodeURL(i->second.value);
         }
-     } else if (kind == YAHTTP_TYPE_REQUEST) {
+     } else if (kind == YAHTTP_TYPE_RESPONSE) {
         for(strcookie_map_t::const_iterator i = jar.cookies.begin(); i != jar.cookies.end(); i++) {
           os << "Set-Cookie: ";
           os << i->second.str() << "\r\n";
index 145123b9fa09705847f2309c7a709b84b9786884..a0dbd1380e6384d1d0573b754f75dc35d3474ebe 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef _YAHTTP_ROUTER_HPP
-#define _YAHTTP_ROUTER_HPP 1
+#pragma once
 /* @file 
  * @brief Defines router class and support structures
  */
@@ -71,5 +70,3 @@ If method is left empty, it will match any method. Name is also optional, but ne
   };
 };
 #endif
-
-#endif
index e3225ea4f6b1409a5f1e089cdeeb41315d6051ea..0002c29339bc0b3702366d8be2f38b6643f4559a 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef _YAHTTP_URL_HPP
-#define _YAHTTP_URL_HPP 1
+#pragma once
 #include <sstream>
 #include <string>
 
@@ -188,4 +187,3 @@ namespace YaHTTP {
     };
   };
 };
-#endif
index 7d485359e0b5114a167d820c7b8951510bec520e..8a93ae6d43dc090e612370e0dd82de9ec3f65876 100644 (file)
@@ -1,6 +1,4 @@
-#ifndef _YAHTTP_UTILITY_HPP
-#define _YAHTTP_UTILITY_HPP 1
-
+#pragma once
 namespace YaHTTP {
   static const char *MONTHS[] = {0,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",0}; //<! List of months 
   static const char *DAYS[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat",0}; //<! List of days
@@ -459,4 +457,3 @@ namespace YaHTTP {
    }; //<! camelizes headers, such as, content-type => Content-Type
   };
 };
-#endif