1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

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
parent aef5d28828
commit 20f50f9133
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;