|XP is just a number|
Perl CGI HTTP2by marcelv (Initiate)
|on Nov 26, 2020 at 15:32 UTC||Need Help??|
marcelv has asked for the wisdom of the Perl Monks concerning the following question:
I currently have quite some scripts running on Perl 5.24 on a Microsoft Windows Server running IIS 10.0. On this server I use a certificate to for HTTPS connections. The scripts are all using the CGI.pm module to do CGI. As I do use Non-Parsed Headers (NPH), all my scripts start with the prefix "nph-" and have the following line to import the CGI module: use CGI qw/:standard -nph/;
Now when a browser requests one of my scripts, these scripts are executed twice. I have made a Wireshark trace and I see the following happening:
This is most evident when Firefox is used, as it does not remember it should use HTTP/1.1 for the request, where Chrome, Edge and Safari do remember.
Now when I remove the "nph-" prefix from the script name (and do not change the contents), the following happens:
Now I could change all my script names by removing the "nph-" prefix, but it seems that the scripts do not really do NPH anymore as the server is sending back a HTTP2 response, whereas with the "nph-" prefix the exact headers as generated by my script are received by the browser.
Now my question: is it possible to HTTP2 via CGI using the CGI module or any other module?