On Mon, Dec 08, 2003 at 12:31:59PM -0800, Stas Bekman wrote:
Andrew Maltsev wrote: [...]
Slurp STDIN before you call CGI->new() into an IO::String object,
Can't. I get references to $cgi and $r, that's given. I tried getting filehandle ($r->connection->fileno(0)), rewinding it and reading again -- that works in http, but does not in https requests.
Can't do what? Slurp the data?
$r->read(my $data, $r->headers_in{'Content-Length'});
It's a complicated multi-thousands lines application (an application server rather) I have no control over at this point. My module gets executed in the middle, where I get $r and $cgi. I can't (well not easily anyway) modify the part around creating that $cgi reference.
I was just making sure there are no other easier options. Like the content being already stored somewhere in the apache core where I can still retrieve it from.
Yes, you can.
Use an earlier phase to slurp the file in. e.g. if you run your code only in PerlHandler phase, you could use PerlFixupHandler on an earlier phase to slurp STDIN, then reopen it to a different filehandle which CGI will use without being aware that it's not the original STDIN.
__________________________________________________________________ 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