Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache2::Request->param fails with POST

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


nmittal at rblt

Oct 21, 2009, 3:12 PM

Post #1 of 7 (199 views)
Permalink
Apache2::Request->param fails with POST

Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to an
authentication script.
<form method=POST
action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
<table>
<tr>
<td align=right>User(or email): </td>
<td><input type=text name=email value=""></td></tr>
<tr>
<td align=right>Password: </td>
<td><input type=password name=password></td></tr></table>
<input type=submit value=Login><BR>
</form>

on the server side.. I have the following code...

use Apache2::Request;
use Apache2::SubRequest;
use Apache2::RequestRec ();
use Apache2::Upload;
use Apache2::URI;

my $r = shift;
my $req = Apache2::Request->new($r);

#Get the Query String and POST data
log("PROCESS", "MESSAGE", "Inside");
my @keys = $req->param;
log("PROCESS", "PARAMS", Dumper($req->param));

when I post the form, the logs show till "Inside" and the browser keeps
loading the page, the CPU consumption on the server is 100% by httpd.

however, if I change the form so it uses GET instead of POST, everything
works fine.

Any help is appreciated.

thanks
Nishant


--
View this message in context: http://www.nabble.com/Apache2%3A%3ARequest-%3Eparam-fails-with-POST-tp26001117p26001117.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


adam.prime at utoronto

Oct 21, 2009, 4:52 PM

Post #2 of 7 (194 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

nmittal wrote:
> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to an
> authentication script.
> <form method=POST
> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
> <table>
> <tr>
> <td align=right>User(or email): </td>
> <td><input type=text name=email value=""></td></tr>
> <tr>
> <td align=right>Password: </td>
> <td><input type=password name=password></td></tr></table>
> <input type=submit value=Login><BR>
> </form>
>
> on the server side.. I have the following code...
>
> use Apache2::Request;
> use Apache2::SubRequest;
> use Apache2::RequestRec ();
> use Apache2::Upload;
> use Apache2::URI;
>
> my $r = shift;
> my $req = Apache2::Request->new($r);
>
> #Get the Query String and POST data
> log("PROCESS", "MESSAGE", "Inside");
> my @keys = $req->param;
> log("PROCESS", "PARAMS", Dumper($req->param));
>
> when I post the form, the logs show till "Inside" and the browser keeps
> loading the page, the CPU consumption on the server is 100% by httpd.
>
> however, if I change the form so it uses GET instead of POST, everything
> works fine.

Obviously that shouldn't happen. Is there anything in the error log?
What version of apreq are you using?

Adam


nmittal at rblt

Oct 21, 2009, 6:25 PM

Post #3 of 7 (193 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

thanks for your reply Adam
There is nothing in the error logs.
I think the version is 3.7.1 (/usr/lib64/libapreq2.so.3.7.1)

could this be a result of virtual hosts?



Adam Prime wrote:
>
> nmittal wrote:
>> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to
>> an
>> authentication script.
>> <form method=POST
>> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
>> <table>
>> <tr>
>> <td align=right>User(or email): </td>
>> <td><input type=text name=email value=""></td></tr>
>> <tr>
>> <td align=right>Password: </td>
>> <td><input type=password name=password></td></tr></table>
>> <input type=submit value=Login><BR>
>> </form>
>>
>> on the server side.. I have the following code...
>>
>> use Apache2::Request;
>> use Apache2::SubRequest;
>> use Apache2::RequestRec ();
>> use Apache2::Upload;
>> use Apache2::URI;
>>
>> my $r = shift;
>> my $req = Apache2::Request->new($r);
>>
>> #Get the Query String and POST data
>> log("PROCESS", "MESSAGE", "Inside");
>> my @keys = $req->param;
>> log("PROCESS", "PARAMS", Dumper($req->param));
>>
>> when I post the form, the logs show till "Inside" and the browser keeps
>> loading the page, the CPU consumption on the server is 100% by httpd.
>>
>> however, if I change the form so it uses GET instead of POST, everything
>> works fine.
>
> Obviously that shouldn't happen. Is there anything in the error log?
> What version of apreq are you using?
>
> Adam
>
>

--
View this message in context: http://www.nabble.com/Apache2%3A%3ARequest-%3Eparam-fails-with-POST-tp26001117p26002722.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


mpeters at plusthree

Oct 22, 2009, 6:17 AM

Post #4 of 7 (188 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

On 10/21/2009 06:12 PM, nmittal wrote:
> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to an
> authentication script.
> <form method=POST
> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">

Try not mixing GET and POST parameters. Put that sid as a hidden input
in the form instead of a GET parameter on the query string? Technically
you're not supposed to mix the 2, but most systems allow it anyways. But
maybe it's tickling a bug here.

--
Michael Peters
Plus Three, LP


nmittal at rblt

Oct 22, 2009, 6:19 AM

Post #5 of 7 (188 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

I have tried that but it still doesnt work. I even tried to POST an empty
form (with no GET or POST params) with same results


Michael Peters wrote:
>
> On 10/21/2009 06:12 PM, nmittal wrote:
>> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to
>> an
>> authentication script.
>> <form method=POST
>> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
>
> Try not mixing GET and POST parameters. Put that sid as a hidden input
> in the form instead of a GET parameter on the query string? Technically
> you're not supposed to mix the 2, but most systems allow it anyways. But
> maybe it's tickling a bug here.
>
> --
> Michael Peters
> Plus Three, LP
>
>

--
View this message in context: http://www.nabble.com/Apache2%3A%3ARequest-%3Eparam-fails-with-POST-tp26001117p26009752.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


adam.prime at utoronto

Oct 22, 2009, 11:24 AM

Post #6 of 7 (185 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

It seems like your libapreq install is broken or something. Did it pass
all the tests when you built it?

Adam

nmittal wrote:
> I have tried that but it still doesnt work. I even tried to POST an empty
> form (with no GET or POST params) with same results
>
>
> Michael Peters wrote:
>> On 10/21/2009 06:12 PM, nmittal wrote:
>>> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to
>>> an
>>> authentication script.
>>> <form method=POST
>>> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
>> Try not mixing GET and POST parameters. Put that sid as a hidden input
>> in the form instead of a GET parameter on the query string? Technically
>> you're not supposed to mix the 2, but most systems allow it anyways. But
>> maybe it's tickling a bug here.
>>
>> --
>> Michael Peters
>> Plus Three, LP
>>
>>
>


ryan at livesite

Oct 22, 2009, 9:14 PM

Post #7 of 7 (179 views)
Permalink
Re: Apache2::Request->param fails with POST [In reply to]

This may be obvious, however note that calling $req->param will invoke
the input filters, should have have any configured.

On 10/21/2009 06:12 PM, nmittal wrote:
> Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to an
> authentication script.
> <form method=POST
> action="/authenticate?sid=06eff4cdc3231db0236cdbe2c51e6618">
> <table>
> <tr>
> <td align=right>User(or email):</td>
> <td><input type=text name=email value=""></td></tr>
> <tr>
> <td align=right>Password:</td>
> <td><input type=password name=password></td></tr></table>
> <input type=submit value=Login><BR>
> </form>
>
> on the server side.. I have the following code...
>
> use Apache2::Request;
> use Apache2::SubRequest;
> use Apache2::RequestRec ();
> use Apache2::Upload;
> use Apache2::URI;
>
> my $r = shift;
> my $req = Apache2::Request->new($r);
>
> #Get the Query String and POST data
> log("PROCESS", "MESSAGE", "Inside");
> my @keys = $req->param;
> log("PROCESS", "PARAMS", Dumper($req->param));
>
> when I post the form, the logs show till "Inside" and the browser keeps
> loading the page, the CPU consumption on the server is 100% by httpd.
>
> however, if I change the form so it uses GET instead of POST, everything
> works fine.
>
> Any help is appreciated.
>
> thanks
> Nishant
>
>
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.