mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:28:12 +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:
parent
aef5d28828
commit
20f50f9133
6 changed files with 16 additions and 10 deletions
|
@ -59,7 +59,7 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
m_download->on_progress = [this](Optional<u32> total_size, u32 downloaded_size) {
|
||||
did_progress(total_size.value(), downloaded_size);
|
||||
};
|
||||
m_download->on_finish = [this](bool success, const ByteBuffer& payload, RefPtr<SharedBuffer> payload_storage, const HashMap<String, String>& response_headers) {
|
||||
m_download->on_finish = [this](bool success, auto& payload, auto payload_storage, auto& response_headers) {
|
||||
did_finish(success, payload, payload_storage, response_headers);
|
||||
};
|
||||
|
||||
|
@ -156,7 +156,7 @@ void DownloadWidget::did_progress(Optional<u32> total_size, u32 downloaded_size)
|
|||
}
|
||||
}
|
||||
|
||||
void DownloadWidget::did_finish(bool success, const ByteBuffer& payload, RefPtr<SharedBuffer> payload_storage, const HashMap<String, String>& response_headers)
|
||||
void DownloadWidget::did_finish(bool success, const ByteBuffer& payload, RefPtr<SharedBuffer> payload_storage, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)
|
||||
{
|
||||
(void)payload;
|
||||
(void)payload_storage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue