I'm trying to convert a small tool to use PerlEx (on IIS) for performance however it seems like there is no way to access the HTTP headers from the client request in this mode. When using the CGI mode in IIS with perl.exe I see them fine, but they vanish when using PerlEx30.dll. I'm testing using curl to send a custom header that I want to grab on the server side. Here is the output from a test script against both server side methods.
D:\>curl https://localhost/debug.pl -H "Token: 3cc8bbeb" -X POST -F Te +st=Test $VAR1 = 'HTTP_ACCEPT'; $VAR2 = 'HTTP_USER_AGENT'; $VAR3 = 'HTTP_HOST'; $VAR4 = 'HTTP_CONTENT_TYPE'; $VAR5 = 'HTTP_TOKEN'; $VAR6 = 'HTTP_CONTENT_LENGTH'; $VAR7 = 'HTTP_EXPECT'; D:\>curl https://localhost/debug.plex -H "Token: 3cc8bbeb" -X POST -F +Test=Test $VAR1 = 'HTTP_USER_AGENT';
The simple script on the server side is the same in both files:
use CGI qw(:standard); use Data::Dumper; my $session = CGI->new(); print "HTTP/1.1 200 OK\n\n"; print Dumper($session->http());

In reply to PerlEx and HTTP request headers by Talroot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.