Ged Haywood wrote:

I suppose you forgot to mention the diamond operator:

my $post_data = <STDIN>;


:):):):):):):):):):):):):):):):):):):):):):):):):):)

Yes, of course I did!

In which case you probably need to turn the slurp mode on:


  {
    local $/; # the slurp mode is now on
    my $post_data = <STDIN>;
  }

without which you may get only the data up to the first input record separator. It may appear to work without it in your private tests, but may be easily affected by the value of $/ changed by other modules, without localizing it.

The above technique is a wide open invitation for DoS attacks, as it'll try to read any amount of incoming data. Therefore you are advised to use read() where you control the amount of data read (e.g. testing that $r->headers_in->{'Content-length'} is not too big).


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to