Thanks for the welcome and the suggestions as to formulate my question better.

The problem that I'm having seems to be generic, which is why my question was phrased that way. To get into more specifics, an example I'm having issues with would be a PUT request which a huge binary file as the payload. It's a request issued with something like curl, so it's just the PUT, some headers, and then the file itself. The application type in this case would be application/octet-stream, so the data is dumped into the PUTDATA parameter by CGI.pm. The problem seems to be there aren't always enough resources available for Perl to read this into memory. Instead of dealing with that whole chunk of data as a scalar, I would want CGI to save it to disc somewhere and just point me to the file.

Here's a super simple example of what I'm talking about:

my $incoming_request = new CGI; print $incoming_request->param("PUTDATA");

The above will cause Perl to run out of memory if the PUT data is large enough.

Thanks again for your help


In reply to Re^2: Handling lots of PUT data in CGI by rufusisnodufus
in thread Handling lots of PUT data in CGI by rufusisnodufus

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.