UPDATE

Thanks for your anwers, monks!

Now this becomes even stranger... Since you guys think it sounds like a mod_perl bug, too, I installed mod_perl 1.26 and apache 1.3.23 on my SuSE 8.0 i686 Box, so I think I'm fairly up to date now.

Next I ran the client script against http://localhost/perl/tmp/echo_post_data.pl and guess what? It hangs with any content length I tried (1, 10, 10000, 11680, 11681, make your pick). Flip $| to zero, and data is flowing... %-|

It also works with mod_cgi (usually via /cgi-bin/), but it does not work with Apache::PerlRun (/cgi-perl/ on my box)

I'd really appreciate if somebody could crosscheck this on the same / other platforms.

I wonder how this can be a mod_perl bug. Am I the only one to use $| = 1 with mod_perl? 1.21 was out in 1998, how could this have been undiscovered until now?

You could break your CGI apps (or someone else's - HARHAR >;) with just one small change. Or, imagine a common CPAN module would start to set $| nonzero in a new verison... wow... 8|

So long,
Flexx


In reply to Re: mod_perl bug when reading post content with $|? by Flexx
in thread mod_perl bug when reading post content with $|? by Flexx

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.