1. Problem Description:
I have written a mod_perl request handler. It reads incoming POST-date
with:
sub handler {
my $r = shift;
# ...
my $cnt = $r-read($buf, $bufsize);
# ...
}
the documentation says
In
http://perl.apache.org/docs/2.0/user/porting/compat.html
I read:
if one wishes to simply read POST data, there is the more modern filter
API, along with continued support for read(STDIN, ...) and
$r-read($buf, $r-headers_in-{'content-length'})
But there are two problems with
$r-read($buf,
Reif Peter wrote:
Unfortunately you cannot tell $r-read to read just all of the data, you
must provide a length.
How do I solve this problems.
$r-read will return 0 when no more data is available. I have been using
the following simple code with success:
my $postdata = ;
while ($r-read(my
I have a problem with a filter and a content handler:
httpd.conf:
...
PerlInputFilterHandler Apache::Filter1
PerlResponseHandler Apache::TestPost
...
--%
-
Apache::Filter1.pm:
package Apache::Filter1;
use strict;
use
Hi Joe,
Joe Schaefer wrote:
Anything here looks suspicious?
Yes. Your code behaves as if CGI.pm was being used by Mason instead
of apreq. When that happens, CGI.pm steals the post data, and
apreq sees nothing but an End of File situation.
If I were you, I'd double-check how you
On Jun 11, 2007, at 4:29 PM, Colin Wetherbee wrote:
That sounds good to me. I'm not looking for any particular
backward compatibility, and speed is an issue.
last i checked the speed difference is negligible. its 'more proper'
to use libapreq, and if you're doing things in term of
Jonathan Vanasco wrote:
As I said in my original post, I tried to use Apache2::Request, but
after creating that object, I couldn't print anything anymore.
Perhaps someone could give me a hint on how to implement it?
could you print beforehand?
'print' might not be tied to the same output.
Colin Wetherbee wrote:
# BEGIN CODE BLOCK
my $req = Apache2::Request-new($r);
$r-content_type('text/html');
$r-print(testbr /\n);
# END CODE BLOCK
OK, problem solved.
I didn't have mod_apreq enabled. For what it's worth, I don't recall
seeing anything about enabling mod_apreq in the
On 6/10/07, abhishek jain [EMAIL PROTECTED] wrote:
I am planing to create a wiki , need to know which cpan module can help me
There are many wikis available. Maybe these articles will help you choose:
http://www.onlamp.com/pub/a/onlamp/2004/11/04/which_wiki.html
On 6/9/07, Octavian Rasnita [EMAIL PROTECTED] wrote:
PerlSwitches -Ie:/web/ANR/lib
PerlModule ANR
...
But the server writes in the log that the module ANR cannot be loaded.
Try dumping out @INC to see what your PerlSwitches command is putting in there.
I am interested in this, because I try
On 6/8/07, Krist van Besien [EMAIL PROTECTED] wrote:
When I then set SWITCH to test and do a server restart, using
httpd -k restart
I get the following output:
backend url is http://testserver:8080/app;
but, and this is the odd thing, the server keeps forwarding requests
to the production
Hello,
When compiling modperl (I used mp2),what's the correct I/O buffer for
it?The server has 1G ethernet interface,would server for something like
flv/wma content.The default buffer is 8K,I think I could increase this
value for better performance.
Thanks!
12 matches
Mail list logo