Re: Using "generic" POST parser in Apache2::Request

2008-09-10 Thread Srebrenko Sehic
On Wed, Sep 10, 2008 at 12:39 PM, Ryan Gies <[EMAIL PROTECTED]> wrote: > Hopefully someone will respond who has experience with libapreq2's hook > API. The below example (libapreq2 not used) which decodes JSON (not > XML) may provide some insight or a temporary solution. Thanks. I'm aware of th

Using "generic" POST parser in Apache2::Request

2008-09-10 Thread Srebrenko Sehic
Hi list, I'm trying to use libapreq2/Apache2::Request to access the POST body/payload under mod_perl2. According to the docs, one can potentially use APR::Request::Parser custom/generic to achieve this. What I'm trying to do is have Apache2::Request process POST payloads with "text/xml" as Content

Re: Modify incoming cookie / connection input filter

2007-06-01 Thread Srebrenko Sehic
On 6/1/07, Daniel Eckstein <[EMAIL PROTECTED]> wrote: Primary goal is to modify incoming cookies before they reach the connector module for bea. It would be even possible to put a additional reverse proxy before the webserver to accomplish this. Like user->reverse proxy -> webserver-> bea conne

Re: Test failure in t/api/server_const subtest 3.

2007-02-05 Thread Srebrenko Sehic
On 2/5/07, Adam Prime x443 <[EMAIL PROTECTED]> wrote: This error only occurs with ap2.2.4 and mp2.0.3, i'm not sure if it's important or not. Something changed between ap2.2.3 and ap2.2.4 which causes it. I've just continued running with mp2.0.3 built against ap2.2.3 until someone can provide

Re: Is there also a way to count the bytes received?

2006-11-14 Thread Srebrenko Sehic
I am logging the bytes sent to a database, I would also like to log the bytes received is there any small chance this can be done? AFAIK, not in mod_perl. However, you can do it with an Apache module and save the data via eg. r->notes for mod_perl.

Re: Hooking into arbitrary ap_hook_* functions

2006-09-25 Thread Srebrenko Sehic
On 9/25/06, Fabian Fagerholm <[EMAIL PROTECTED]> wrote: The question is, how do I implement the above in mod_perl? More generally, how do I implement an arbitrary ap_hook_* function in Perl and register it with Apache2? AFAIK, I don't think you can, unless you hack the mod_perl sources. If I r

Re: [mp2] accessing mod_perl configuration from another C module

2006-09-14 Thread Srebrenko Sehic
On 9/14/06, Srebrenko Sehic <[EMAIL PROTECTED]> wrote: I need to tap into PerlSetVar table from another C module. In mp1, you can do something like the following: #include "mod_perl.h" perl_dir_config *c = (perl_dir_config *) ap_get_module_config(r->per_dir_config, &

[mp2] accessing mod_perl configuration from another C module

2006-09-14 Thread Srebrenko Sehic
I need to tap into PerlSetVar table from another C module. In mp1, you can do something like the following: #include "mod_perl.h" perl_dir_config *c = (perl_dir_config *) ap_get_module_config(r->per_dir_config, &perl_module); table *perl_vars = c->vars; char *value = ap_table_get(perl_vars,

Re: [mp2] accessing variables set via SetEnv?

2006-06-19 Thread Srebrenko Sehic
On 6/19/06, Srebrenko Sehic <[EMAIL PROTECTED]> wrote: If there any way to access and change a variable set via normal Apache "SetEnv myvar 1"? I've got some other Apache modules that do stuff depending on the value and I want to control that behaviour from mod_per

[mp2] accessing variables set via SetEnv?

2006-06-19 Thread Srebrenko Sehic
If there any way to access and change a variable set via normal Apache "SetEnv myvar 1"? I've got some other Apache modules that do stuff depending on the value and I want to control that behaviour from mod_perl. Something like $r->dir_config("myvar"), but that also works on variables set by othe

Re: [mp2] reading POST body in PerlAccessHandler more then once

2006-06-07 Thread Srebrenko Sehic
Have a look at Apache2::Debug filter as it does this. http://search.cpan.org/~pgollucci/Apache2-DebugFilter-0.02/ I'm aware of this. The problem is, that DebugFilter runs in an InputFilter hook. That works fine, i.e. a POST body can be read more than once. But, it does not work in PerlAccessHand

Re: [mp2] reading POST body in PerlAccessHandler more then once

2006-06-05 Thread Srebrenko Sehic
I've reimplemented read_post_body as specified below and the problem *still* persist. I can only read POST body once. I've looked at libapreq2 code and they implement "apreq_brigade_copy" which (it seems) takes a copy of the bucket brigade and passes "the original" on along. Can something similar

Re: [mp2] reading POST body in PerlAccessHandler more then once

2006-06-05 Thread Srebrenko Sehic
On 6/5/06, Philip M. Gollucci <[EMAIL PROTECTED]> wrote: > I've defined a PerlAccessHandler which needs access to POST body. I've > implemented a sub read_post {} which uses bucket brigades API to read > the body (taken from mod_perl2 docs) and returns the data. However, > the POST body is gone

reading POST body in PerlAccessHandler more then once

2006-06-05 Thread Srebrenko Sehic
I've defined a PerlAccessHandler which needs access to POST body. I've implemented a sub read_post {} which uses bucket brigades API to read the body (taken from mod_perl2 docs) and returns the data. However, the POST body is gone after I read it. Is there any way to read the POST body and pass t

[mp2] reading POST body in PerlAccessHandler more then once

2006-06-05 Thread Srebrenko Sehic
(I've sent this previously but it didn't get thru somehow; sorry for the re-post) I've defined a PerlAccessHandler which needs access to POST body. I've implemented a sub read_post {} which uses bucket brigades API to read the body (taken from mod_perl2 docs) and returns the data. However, the PO

Re: mod_perl/mod_proxy with Apache 2.2

2005-12-23 Thread Srebrenko Sehic
Try $r->proxyreq(2) and it will work. On 12/22/05, Arnaud Desmons <[EMAIL PROTECTED]> wrote: > Hi, > > Is this still supposed to work in TransHandler with Apache 2.2 ? > > sub handler { > my $r = shift; > > my $uri = $r->uri; > $r->filename("proxy:http://test:4949"

[mp2] Re-using POST data between input handler/filter

2005-11-02 Thread Srebrenko Sehic
Hi list, I have a PerlAccessHandler which needs a copy of the POST data from the client in order to perform some validation. If the POST data is valid, the request is passed to mod_proxy which sends it to the backend server (filter returns Apache2::Const::OK) If the POST data is invalid, it return

Activating/decativating PerlOutputFilterHandler "on-the-fly"

2005-05-02 Thread Srebrenko Sehic
Hi ppl, I have a couple of PerlOutputFilterHandler directives registered in my httpd.conf conigurations. Is there any way to activate/deactivate these filters without editing httpd.conf and restarting Apache? I'm running Apache 2.0.54 with mod_perl2_RC5. TIA, // haver