mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Include headers HashMap in the LoadRequest::hash() calculation
This commit is contained in:
parent
54fe0c8855
commit
e92b576cba
Notes:
sideshowbarker
2024-07-18 04:08:10 +09:00
Author: https://github.com/bgianfo
Commit: e92b576cba
Pull-request: https://github.com/SerenityOS/serenity/pull/9991
Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 2 deletions
|
@ -34,8 +34,10 @@ public:
|
|||
|
||||
unsigned hash() const
|
||||
{
|
||||
// FIXME: Include headers in the hash as well
|
||||
return pair_int_hash(pair_int_hash(m_url.to_string().hash(), m_method.hash()), string_hash((const char*)m_body.data(), m_body.size()));
|
||||
auto body_hash = string_hash((const char*)m_body.data(), m_body.size());
|
||||
auto body_and_headers_hash = pair_int_hash(body_hash, m_headers.hash());
|
||||
auto url_and_method_hash = pair_int_hash(m_url.to_string().hash(), m_method.hash());
|
||||
return pair_int_hash(body_and_headers_hash, url_and_method_hash);
|
||||
}
|
||||
|
||||
bool operator==(const LoadRequest& other) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue