Subject: | CGI::Simple uses in method url() the env SCRIPT_NAME instead of preferred REQUEST_URI / SCRIPT_URI |
Date: | Thu, 20 Sep 2018 19:10:07 +0200 |
To: | bug-CGI-Simple [...] rt.cpan.org |
From: | GwenDragon <info [...] gwendragon.de> |
Hello,
I found a issue which may be a trap for users havin rewrites on the
webserver.
CGI::Simple does not use environment SCRIPT_URI or REQUEST_URI for the
creation of content of method url().
That differs from CGI.pm, but is unfortunately not mentioned in perldoc.
CGI.pm uses the URI sent to browser [i.e. request_uri()] which is a
practical use if the server uses rewrites access to script.
CGI::Simple uses script_name() which leads to problems if a internal
rewrite occurs.
Would be nice to get a patch to be compatible to CGI.pm behavior.
CGI.pm uses
(https://metacpan.org/source/LEEJO/CGI-4.40/lib/CGI.pm#L2695)