mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
LibWeb: Include headers HashMap in the LoadRequest::hash() calculation
This commit is contained in:
parent
54fe0c8855
commit
e92b576cba
1 changed files with 4 additions and 2 deletions
|
@ -34,8 +34,10 @@ public:
|
||||||
|
|
||||||
unsigned hash() const
|
unsigned hash() const
|
||||||
{
|
{
|
||||||
// FIXME: Include headers in the hash as well
|
auto body_hash = string_hash((const char*)m_body.data(), m_body.size());
|
||||||
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_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
|
bool operator==(const LoadRequest& other) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue