LibProtocol: Pass response headers in a case insensitive HashMap

HTTP headers are case-insensitive, so just add CaseInsensitiveTraits
to the HashMap and we're good to go! :^)
This commit is contained in:
Andreas Kling 2020-05-10 21:26:53 +02:00
commit 20f50f9133
Notes: sideshowbarker 2024-07-19 06:44:47 +09:00
6 changed files with 16 additions and 10 deletions

View file

@ -41,8 +41,8 @@ class ResourceLoader : public Core::Object {
public:
static ResourceLoader& the();
void load(const URL&, Function<void(const ByteBuffer&, const HashMap<String, String>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
void load_sync(const URL&, Function<void(const ByteBuffer&, const HashMap<String, String>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
void load(const URL&, Function<void(const ByteBuffer&, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
void load_sync(const URL&, Function<void(const ByteBuffer&, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
Function<void()> on_load_counter_change;