Re: Problems with STDIN and POST data



On Feb 13, 2:36 pm, xhos...@xxxxxxxxx wrote:
SergioQ <ser...@xxxxxxxxxx> wrote:

Am having some very serious problems reading the POST data that is
being sent to my Perl script. The full code (minus my email address
is below). And essentially what I am getting back via email reports
is that that there is data being sent via POST, and tht it has a
length of 1431. Yet all my attempts to read it are failing
miserably.

use CGI qw(:standard);
...
read STDIN, $serg_bffr, $ENV{'CONTENT_LENGTH'};
...

Since you are using it, why not use CGI to read from STDIN for you?

IIRC It does automatically when use()d in this manner. Thats why
$serg_bffr is empty.

Todd W.
.



Relevant Pages

  • Re: Problems with STDIN and POST data
    ... Am having some very serious problems reading the POST data that is ... being sent to my Perl script. ... The full code (minus my email address ... why not use CGI to read from STDIN for you? ...
    (comp.lang.perl.misc)
  • Re: Getting CGI to read from a different STDIN source
    ... Bill Gerba wrote: ... Check out the CGI docs under the section "CREATING A NEW QUERY OBJECT ... except it didn't give any error message about STDOUT. ... open the file into STDIN so CGI.pm can read it ...
    (comp.lang.perl.misc)
  • Testing CGI.pm-using code
    ... But I can't get CGI to ... close STDIN; ... test('foo'); ... In my address everything before the first period is backwards; ...
    (comp.lang.perl.misc)
  • Re: Catching the qf before its deleted.
    ... The alias pipes into a Perl script. ... >time it reads the Msgid and from STDIN and parses the QF name. ... What I did was modify the sendmail source code at the point where it would ...
    (comp.mail.sendmail)
  • [Full-Disclosure] PR0V1NG RFP WR0NG
    ... > *FROM WITHIN* a CGI. ... You can not pass POST parameter (STDIN) to these ... for STDIN to be fed to the sub-application (a sub-application such as ... > You can not pass POST parameter to these applications because the ...
    (Full-Disclosure)