i2ptunnel: Canonicalize Host header at the server proxy

to prevent duplicate headers being sent to the server
resulting in 400 errors
as reported by altonen
This commit is contained in:
zzz
2025-04-26 08:54:16 -04:00
parent c60e748a24
commit 508fe2ce52

View File

@ -1224,6 +1224,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
name = "Referer"; name = "Referer";
else if ("connection".equals(lcName)) else if ("connection".equals(lcName))
name = "Connection"; name = "Connection";
else if ("host".equals(lcName))
name = "Host";
// For incoming, we remove certain headers to prevent spoofing. // For incoming, we remove certain headers to prevent spoofing.
// For outgoing, we remove certain headers to improve anonymity. // For outgoing, we remove certain headers to improve anonymity.