]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3609] Named vector of HTTP header contexts
authorFrancis Dupont <fdupont@isc.org>
Tue, 12 Nov 2024 16:14:21 +0000 (17:14 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 22 Nov 2024 08:55:30 +0000 (09:55 +0100)
src/lib/http/header_context.h
src/lib/http/request_context.h
src/lib/http/response_context.h

index 623e26395bcf2eb8b5819f9f36aefe7c12f4ba29..9baf48201a9454d5d9c71b66548fa9dfcc4b331e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2024 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -10,6 +10,7 @@
 #include <boost/lexical_cast.hpp>
 #include <cstdint>
 #include <string>
+#include <vector>
 
 namespace isc {
 namespace http {
@@ -43,6 +44,9 @@ struct HttpHeaderContext {
     }
 };
 
+/// @brief Collection of HTTP header contexts.
+typedef std::vector<HttpHeaderContext> HttpHeaderContexts;
+
 } // namespace http
 } // namespace isc
 
index bcbacdac43a5ceec11738cf0359d063deba28f09..22aae21c6c4600704ec00977f2ad6f32a12df68f 100644 (file)
@@ -10,7 +10,6 @@
 #include <http/header_context.h>
 #include <boost/shared_ptr.hpp>
 #include <string>
-#include <vector>
 
 namespace isc {
 namespace http {
@@ -30,7 +29,7 @@ struct HttpRequestContext {
     /// @brief HTTP minor version number.
     unsigned int http_version_minor_;
     /// @brief Collection of HTTP headers.
-    std::vector<HttpHeaderContext> headers_;
+    HttpHeaderContexts headers_;
     /// @brief HTTP request body.
     std::string body_;
 };
index a8214776ebaad4c610460409d0ce919d5d372d30..e241f0e7fd1ed6a7817682a623d2f341c3439f76 100644 (file)
@@ -10,7 +10,6 @@
 #include <http/header_context.h>
 #include <boost/shared_ptr.hpp>
 #include <string>
-#include <vector>
 
 namespace isc {
 namespace http {
@@ -30,7 +29,7 @@ struct HttpResponseContext {
     /// @brief HTTP status phrase.
     std::string phrase_;
     /// @brief Collection of HTTP headers.
-    std::vector<HttpHeaderContext> headers_;
+    HttpHeaderContexts headers_;
     /// @brief HTTP request body.
     std::string body_;
 };