From 4beb7ac7454e94aa74447181855079f1271b8d90 Mon Sep 17 00:00:00 2001
From: "Tobias S. Josefowitz" <tobij@tobij.de>
Date: Wed, 2 Dec 2020 22:42:06 +0100
Subject: [PATCH] Standards.URI: make __hash() invariant to case of hostname

`==() is invariant to it already, and the hashes of two "identical" URI
objects should ideally be equal as well.
---
 lib/modules/Standards.pmod/URI.pike | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/modules/Standards.pmod/URI.pike b/lib/modules/Standards.pmod/URI.pike
index 082337db12..69d595d5a9 100644
--- a/lib/modules/Standards.pmod/URI.pike
+++ b/lib/modules/Standards.pmod/URI.pike
@@ -559,7 +559,7 @@ string get_http_path_query() {
   return http_encode(((path||"")/"/")[*])*"/" + (q?"?"+q:"");
 }
 
-int __hash() { return hash_value(_sprintf('s')); }
+int __hash() { return hash_value(_sprintf('x')); }
 
 private mapping(int:string) sprintf_cache = ([]);
 string _sprintf(int how, mapping|void args)
-- 
GitLab