summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/network/ProtectionSpaceHash.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/network/ProtectionSpaceHash.h')
-rw-r--r--WebCore/platform/network/ProtectionSpaceHash.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/platform/network/ProtectionSpaceHash.h b/WebCore/platform/network/ProtectionSpaceHash.h
index 6f68b5b..f8c84e8 100644
--- a/WebCore/platform/network/ProtectionSpaceHash.h
+++ b/WebCore/platform/network/ProtectionSpaceHash.h
@@ -37,11 +37,15 @@ struct ProtectionSpaceHash {
protectionSpace.host().impl() ? protectionSpace.host().impl()->hash() : 0,
protectionSpace.port(),
protectionSpace.serverType(),
- protectionSpace.realm().impl() ? protectionSpace.realm().impl()->hash() : 0,
- protectionSpace.authenticationScheme()
+ protectionSpace.authenticationScheme(),
+ protectionSpace.realm().impl() ? protectionSpace.realm().impl()->hash() : 0
};
- return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), sizeof(hashCodes) / sizeof(UChar));
+ unsigned codeCount = sizeof(hashCodes) / sizeof(UChar);
+ // Ignore realm for proxies.
+ if (protectionSpace.isProxy())
+ codeCount -= sizeof(hashCodes[0]) / sizeof(UChar);
+ return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), codeCount);
}
static bool equal(const ProtectionSpace& a, const ProtectionSpace& b) { return a == b; }