You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "James B. Muir" <Ja...@hitchcock.org> on 2011/01/27 17:08:24 UTC

POST method and PerlAuthenHandler

Hello,

I am writing a perl authentication module for Apache2 that must inspect some request parameters before authorizing the requestor and forwarding the request to a tomcat server via mod_jk.

With the GET request method this is easy, I can inspect the parameters using $r->args and forward the request.

With the POST request method I can READ the request body, but it appears that the request body is removed from the request and is not forwarded to tomcat via mod_jk. Is this correct?

How do I inspect POST request parameters without modifying the request?

I know there must be a standard way to do this kind of thing but I have been unable find the answer after several hours of reading.
Thank you for your help.
-James





IMPORTANT NOTICE REGARDING THIS ELECTRONIC MESSAGE:

This message is intended for the use of the person to whom it is addressed and may contain information that is privileged, confidential, and protected from disclosure under applicable law. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.

RE: POST method and PerlAuthenHandler

Posted by "James B. Muir" <Ja...@hitchcock.org>.
I've got Apache2::Request working and POST requests are working very nicely.

Thanks for steeing me in the right direction!
-James


________________________________
From: Joe Schaefer [joe_schaefer@yahoo.com]
Sent: Thursday, January 27, 2011 11:12 AM
To: James B. Muir; modperl@perl.apache.org
Subject: Re: POST method and PerlAuthenHandler

Use apreq.

From: James B. Muir <Ja...@hitchcock.org>
To: "modperl@perl.apache.org" <mo...@perl.apache.org>
Sent: Thu, January 27, 2011 11:08:24 AM
Subject: POST method and PerlAuthenHandler

Hello,

I am writing a perl authentication module for Apache2 that must inspect some request parameters before authorizing the requestor and forwarding the request to a tomcat server via mod_jk.

With the GET request method this is easy, I can inspect the parameters using $r->args and forward the request.

With the POST request method I can READ the request body, but it appears that the request body is removed from the request and is not forwarded to tomcat via mod_jk. Is this correct?

How do I inspect POST request parameters without modifying the request?

I know there must be a standard way to do this kind of thing but I have been unable find the answer after several hours of reading.
Thank you for your help.
-James





IMPORTANT NOTICE REGARDING THIS ELECTRONIC MESSAGE:

This message is intended for the use of the person to whom it is addressed and may contain information that is privileged, confidential, and protected from disclosure under applicable law. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.


IMPORTANT NOTICE REGARDING THIS ELECTRONIC MESSAGE:

This message is intended for the use of the person to whom it is addressed and may contain information that is privileged, confidential, and protected from disclosure under applicable law. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.

Re: POST method and PerlAuthenHandler

Posted by Joe Schaefer <jo...@yahoo.com>.
Use apreq.


>
>From: James B. Muir <Ja...@hitchcock.org>
>To: "modperl@perl.apache.org" <mo...@perl.apache.org>
>Sent: Thu, January 27, 2011 11:08:24 AM
>Subject: POST method and PerlAuthenHandler
>
>  
>Hello, 
> 
>I am writing a perl authentication module for Apache2 that must inspect some 
>request parameters before authorizing the requestor and forwarding the request 
>to a tomcat server via mod_jk.
> 
>With the GET request method this is easy, I can inspect the parameters using 
>$r->args and forward the request.
> 
>With the POST request method I can READ the request body, but it appears that 
>the request body is removed from the request and is not forwarded to tomcat via 
>mod_jk. Is this correct?
> 
>How do I inspect POST request parameters without modifying the request?
> 
>I know there must be a standard way to do this kind of thing but I have been 
>unable find the answer after several hours of reading. 
>
>Thank you for your help.
>-James
> 
> 
> 
> 
>IMPORTANT NOTICE REGARDING THIS ELECTRONIC MESSAGE:
>
>This message is intended for the use of the person to whom it is addressed and 
>may contain information that is privileged, confidential, and protected from 
>disclosure under applicable law. If you are not the intended recipient, your use 
>of this message for  any purpose is strictly prohibited. If you have received 
>this communication in error, please delete the message and notify the sender so 
>that we may correct our records.
>