Dear Monks,

I have a script (actually a home grown module) that I am in charge of maintaining. It's function is to take in some text from several text fields, and grab an image from an "image upload" field. The text/image is then slurped into an html template and published to a local website. Yawn.

However, the users are noticing some weird behavior that is very hard to replicate. The users cull articles from various places on the web, copy/paste them into the text fields and grab their images and upload them using the tool. The weird behavior is that certain articles will not submit properly. There seems to be no difference that I could see, and the spaghetti code that is the module is very hard to figure out (rather than giving a good error message, it merely dumps one out to the GUI again, as though nothing had happened).

Then I tried removing a paragraph at a time from an offending article and submitting it. After I'd removed about half the text, it submitted properly. This leads me to think that it has something to do with $CGI::POST_MAX, which is currently set to CGI.pm's default.

My question: does $CGI::POST_MAX include the bytes of the file being uploaded as well as the text (in otherwords, is the binary data included in the POST_MAX)? If so, it could explain why certain articles are problems and other seemingly similar articles are not--their images are not as large.

Much thanks,

Chris


In reply to $CGI::POST_MAX question by alienhuman

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.