From 73cfed86d8a8287a84221e0c79b60e03cb88a9ce Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Jun 2018 22:43:56 +0000 Subject: www: use undecoded paths for Message-ID extraction In PSGI, PATH_INFO contains URI-decoded paths which cause problems when Message-IDs contain ambiguous characters for used for routing. Instead, extract the undecoded path from REQUEST_URI and use that. Reported-by: Leah Neukirchen https://public-inbox.org/meta/8736xsb5s5.fsf@vuxu.org/ --- t/cgi.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/cgi.t b/t/cgi.t index bd92ca36..2e2476d7 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -225,6 +225,8 @@ sub cgi_run { my %env = ( PATH_INFO => $_[0], QUERY_STRING => $_[1] || "", + SCRIPT_NAME => '', + REQUEST_URI => $_[0] . ($_[1] ? "?$_[1]" : ''), REQUEST_METHOD => $_[2] || "GET", GATEWAY_INTERFACE => 'CGI/1.1', HTTP_ACCEPT => '*/*', -- cgit v1.2.3-24-ge0c7