Esteemed Monks,

I feel like I am having a stupid moment! On a normal HTTP server when the REQUEST_METHOD is POST you pull CONTENT_LENGTH characters from STDIN. But when using HTTPServer (v1.1.1) I only get the following environment variables:

2005/06/29 16:17:51 - POST /foo/bar.pl Method => POST Use of uninitialized value in concatenation (.) or string at G:\EngDat +a\EP2058 InContact\EP2058-002\server_01.pl line 42. Query => SERVER_NAME ->> mercury SCRIPT_NAME ->> /foo/bar.pl REMOTE_ADDR ->> 64.105.135.235 SERVER_ADMIN ->> webmaster@mercury SERVER_PROTOCOL ->> HTTP/1.1 REQUEST_METHOD ->> POST <?xml version ->> "1.0"?> <campaign menuid="9839-2" callid="0" action="5" duration="0" comment=" +test"/> REMOTE_NAME ->> h-64-105-135-235.lsanca54.covad.net GATEWAY_INTERFACE ->> CGI/1.1 SERVER_SOFTWARE ->> Net::HTTPServer/1.1.1 HTTP_USER_AGENT ->> Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpReq +uest.5)
The content I am looking for is this XML:
<?xml version ->> "1.0"?> <campaign menuid="9839-2" callid="0" action="5" duration="0" comment=" +test"/>
The ->> is my separator where I print the list. My poor little brain cannot see how I am supposed to get the content! Help me please!

jdtoronto


In reply to In HTTPServer - how do I get POST content? by jdtoronto

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.