diff options
-rw-r--r-- | Libraries/LibHTTP/HttpResponse.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibHTTP/HttpResponse.h | 8 | ||||
-rw-r--r-- | Libraries/LibHTTP/Job.h | 2 | ||||
-rw-r--r-- | Services/ProtocolServer/Download.cpp | 2 | ||||
-rw-r--r-- | Services/ProtocolServer/Download.h | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/Libraries/LibHTTP/HttpResponse.cpp b/Libraries/LibHTTP/HttpResponse.cpp index dc8f6468f4..db5711ff5c 100644 --- a/Libraries/LibHTTP/HttpResponse.cpp +++ b/Libraries/LibHTTP/HttpResponse.cpp @@ -28,7 +28,7 @@ namespace HTTP { -HttpResponse::HttpResponse(int code, HashMap<String, String>&& headers, ByteBuffer&& payload) +HttpResponse::HttpResponse(int code, HashMap<String, String, CaseInsensitiveStringTraits>&& headers, ByteBuffer&& payload) : Core::NetworkResponse(move(payload)) , m_code(code) , m_headers(move(headers)) diff --git a/Libraries/LibHTTP/HttpResponse.h b/Libraries/LibHTTP/HttpResponse.h index 4f86cbe9e9..f36b98bd13 100644 --- a/Libraries/LibHTTP/HttpResponse.h +++ b/Libraries/LibHTTP/HttpResponse.h @@ -35,19 +35,19 @@ namespace HTTP { class HttpResponse : public Core::NetworkResponse { public: virtual ~HttpResponse() override; - static NonnullRefPtr<HttpResponse> create(int code, HashMap<String, String>&& headers, ByteBuffer&& payload) + static NonnullRefPtr<HttpResponse> create(int code, HashMap<String, String, CaseInsensitiveStringTraits>&& headers, ByteBuffer&& payload) { return adopt(*new HttpResponse(code, move(headers), move(payload))); } int code() const { return m_code; } - const HashMap<String, String>& headers() const { return m_headers; } + const HashMap<String, String, CaseInsensitiveStringTraits>& headers() const { return m_headers; } private: - HttpResponse(int code, HashMap<String, String>&&, ByteBuffer&&); + HttpResponse(int code, HashMap<String, String, CaseInsensitiveStringTraits>&&, ByteBuffer&&); int m_code { 0 }; - HashMap<String, String> m_headers; + HashMap<String, String, CaseInsensitiveStringTraits> m_headers; }; } diff --git a/Libraries/LibHTTP/Job.h b/Libraries/LibHTTP/Job.h index c441660635..9631dde4ae 100644 --- a/Libraries/LibHTTP/Job.h +++ b/Libraries/LibHTTP/Job.h @@ -73,7 +73,7 @@ protected: HttpRequest m_request; State m_state { State::InStatus }; int m_code { -1 }; - HashMap<String, String> m_headers; + HashMap<String, String, CaseInsensitiveStringTraits> m_headers; Vector<ByteBuffer> m_received_buffers; size_t m_received_size { 0 }; bool m_sent_data { 0 }; diff --git a/Services/ProtocolServer/Download.cpp b/Services/ProtocolServer/Download.cpp index e4bbce082b..e205d38a55 100644 --- a/Services/ProtocolServer/Download.cpp +++ b/Services/ProtocolServer/Download.cpp @@ -64,7 +64,7 @@ void Download::set_payload(const ByteBuffer& payload) m_total_size = payload.size(); } -void Download::set_response_headers(const HashMap<String, String>& response_headers) +void Download::set_response_headers(const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers) { m_response_headers = response_headers; } diff --git a/Services/ProtocolServer/Download.h b/Services/ProtocolServer/Download.h index 5609cd15b4..0796765482 100644 --- a/Services/ProtocolServer/Download.h +++ b/Services/ProtocolServer/Download.h @@ -47,7 +47,7 @@ public: Optional<u32> total_size() const { return m_total_size; } size_t downloaded_size() const { return m_downloaded_size; } const ByteBuffer& payload() const { return m_payload; } - const HashMap<String, String>& response_headers() const { return m_response_headers; } + const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers() const { return m_response_headers; } void stop(); @@ -57,7 +57,7 @@ protected: void did_finish(bool success); void did_progress(Optional<u32> total_size, u32 downloaded_size); void set_payload(const ByteBuffer&); - void set_response_headers(const HashMap<String, String>&); + void set_response_headers(const HashMap<String, String, CaseInsensitiveStringTraits>&); private: i32 m_id; @@ -65,6 +65,6 @@ private: Optional<u32> m_total_size {}; size_t m_downloaded_size { 0 }; ByteBuffer m_payload; - HashMap<String, String> m_response_headers; + HashMap<String, String, CaseInsensitiveStringTraits> m_response_headers; WeakPtr<PSClientConnection> m_client; }; |