Re: Extra bucket brigade with just an EOS on an input filter at the end.

2021-08-08 Thread Joe Orton
r documented. I wrote this in mod_ssl: /* Surprisingly (and perhaps, wrongly), the request body can be * pulled from the input filter stack more than once; a * handler may read it, and ap_discard_request_body() will * attempt to do so again after *every* request. So input

Extra bucket brigade with just an EOS on an input filter at the end.

2021-08-07 Thread Dirk-Willem van Gulik
In some code (https://source.redwax.eu/svn/redwax/rs/mod_cms_verify/trunk/mod_cms_verify.c) I have in input filter (that checks a PKCS#7 signature before passing the payload on to a proxy/cgi-script, etc). I am testing this with: echo "field1=foo&f

Re: input filter problem

2013-05-01 Thread Eric Covener
ore the post body is read, or it will not run at all. You can't really write anything that runs before the real handler that also notices something your input filter will change. There is a module in 2.4 that allows the request body to be buffered, but I don't know much about it. http://htt

Re: input filter problem

2013-05-01 Thread Marian Marinov
On 05/01/2013 04:23 PM, Eric Covener wrote: However I'm unable to make my input filter function to be called before my handler. Input filters are normally called during the handler, when the handler tries to read the request body through the filter chain. In your case, the body is pro

Re: input filter problem

2013-05-01 Thread Eric Covener
> However I'm unable to make my input filter function to be called before my > handler. Input filters are normally called during the handler, when the handler tries to read the request body through the filter chain. In your case, the body is probably not read until the core of Apa

input filter problem

2013-05-01 Thread Marian Marinov
Hi guys, I'm developing a module that needs to do the following things: 1. Read POST arguments 2. Read input headers 3. Read Query string arguments I have decided to implement it by having an input filter for the POST parsing(since this is the only way to look into the POST without consumi

Re: What is a "clogging" input filter?

2013-04-22 Thread Jim Jagielski
t; Would something like the attached patch work? > > Looking closer at mod_ssl, it seems that when it writes, it wires in both the > input and output filter stacks, which is good, but when it reads, only the > input filter stack is wired in, which means it can never write. This might > need to be looked at too. > > Regards, > Graham > -- >

Re: What is a "clogging" input filter?

2013-04-19 Thread Graham Leggett
flow, but this is still a non-trivial project. Would something like the attached patch work? Looking closer at mod_ssl, it seems that when it writes, it wires in both the input and output filter stacks, which is good, but when it reads, only the input filter stack is wired in, which means it c

Re: What is a "clogging" input filter?

2013-04-19 Thread Eric Covener
On Fri, Apr 19, 2013 at 11:14 AM, Graham Leggett wrote: > Hi all, > > Currently mod_ssl doesn't work with the event MPM, as per the following code: > > if (c->clogging_input_filters && !c->aborted) { > /* Since we have an input filter which 'c

What is a "clogging" input filter?

2013-04-19 Thread Graham Leggett
Hi all, Currently mod_ssl doesn't work with the event MPM, as per the following code: if (c->clogging_input_filters && !c->aborted) { /* Since we have an input filter which 'cloggs' the input stream, * like mod_ssl, lets just do the n

Re: chunked trailers input filter processing by ap_http_filter should be documented

2013-02-12 Thread Joe Schaefer
Thx Bill!  I will let a few days of lazy consensus pass before committing this to trunk. > > From: William A. Rowe Jr. >To: dev@httpd.apache.org >Cc: joe_schae...@yahoo.com >Sent: Tuesday, February 12, 2013 11:52 AM >Subject: Re: chun

Re: chunked trailers input filter processing by ap_http_filter should be documented

2013-02-12 Thread William A. Rowe Jr.
On Sun, 10 Feb 2013 08:25:35 -0800 (PST) Joe Schaefer wrote: > Here's a sledgehammer patch to ap_rgetline_core() > to replace r->input_filters with r->proto_input_filters. > This would still mean protocol filters behind ap_http_filter > would need to punt on these calls, but that's a lot > more r

Re: chunked trailers input filter processing by ap_http_filter should be documented

2013-02-10 Thread Joe Schaefer
{ return rv; > > From: Joe Schaefer >To: "dev@httpd.apache.org" >Sent: Sunday, February 10, 2013 11:05 AM >Subject: chunked trailers input filter processing by ap_http_filter should be >documented > > >So ap_http_filter

chunked trailers input filter processing by ap_http_filter should be documented

2013-02-10 Thread Joe Schaefer
fix the code. It would be logically better if there were a way to pass a ap_filter_t argument to ap_get_mime_headers so ap_http_filter didn't need to reach backwards in the input filter chain just to finish its HTTP protocol handling.

Re: rethinking connection input filter API

2011-11-11 Thread Jim Jagielski
On Nov 11, 2011, at 4:25 AM, Graham Leggett wrote: > > My moon-on-a-stick would be for this to be ap_mpm_poll_connections() instead, > and allow the option to add extra connections to the poll (for something like > mod_proxy and friends, with the option to have each of these extra > connectio

Re: rethinking connection input filter API

2011-11-11 Thread Jim Jagielski
On Nov 10, 2011, at 11:42 AM, Paul Querna wrote: > > This means every input filter, must implement all of these different > modes. This significantly complicates modules like mod_ssl and > reqtimeout. Every module to support things like speculative must > support buffering int

Re: rethinking connection input filter API

2011-11-11 Thread Graham Leggett
On 10 Nov 2011, at 9:42 PM, Paul Querna wrote: The input filter API function signature is the following: apr_status_t func( ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes); Problems: 1) This

Re: svn commit: r1200612 - in /httpd/httpd/branches/input-filter-dev: include/util_filter.h modules/debugging/mod_dumpio.c modules/filters/mod_reqtimeout.c modules/ssl/ssl_engine_io.c server/core_filt

2011-11-10 Thread William A. Rowe Jr.
On 11/10/2011 5:53 PM, Paul Querna wrote: I think this got fixed when mod_ssl was changed to support RFC 2817 - Upgrading to TLS Within HTTP/1.1. That would make sense.

Re: svn commit: r1200612 - in /httpd/httpd/branches/input-filter-dev: include/util_filter.h modules/debugging/mod_dumpio.c modules/filters/mod_reqtimeout.c modules/ssl/ssl_engine_io.c server/core_filt

2011-11-10 Thread Paul Querna
On Thu, Nov 10, 2011 at 3:35 PM, William A. Rowe Jr. wrote: > On 11/10/2011 4:55 PM, pque...@apache.org wrote: >> >> URL: http://svn.apache.org/viewvc?rev=1200612&view=rev >> Log: >> Remove AP_MODE_INIT, it is a no-op, everywhere > > This was added in order to init ssl connections on protocols whi

Re: svn commit: r1200612 - in /httpd/httpd/branches/input-filter-dev: include/util_filter.h modules/debugging/mod_dumpio.c modules/filters/mod_reqtimeout.c modules/ssl/ssl_engine_io.c server/core_filt

2011-11-10 Thread William A. Rowe Jr.
On 11/10/2011 4:55 PM, pque...@apache.org wrote: URL: http://svn.apache.org/viewvc?rev=1200612&view=rev Log: Remove AP_MODE_INIT, it is a no-op, everywhere This was added in order to init ssl connections on protocols which follow a write-then-read logic like snmp or ftp. I should be able to c

rethinking connection input filter API

2011-11-10 Thread Paul Querna
The input filter API function signature is the following: apr_status_t func( ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes); Problems: 1) This gives the caller of the API control over

Re: How to do a internal redirect (was: sub-request) from input filter?

2011-04-28 Thread Micha Lenk
Hi Nick, On Wed, Apr 27, 2011 at 06:39:49PM +0100, Nick Kew wrote: > You may be a little confused. Subrquests and internal redirects > are not the same thing, and serve different purposes. [...] You're right, what I want is an internal redirect from within my input filter, not a

Re: How to do a sub-request from input filter?

2011-04-27 Thread Micha Lenk
>do a sub-request to a different location from within an input filter. > > > >What is the easiest way to achieve this? Reading Nick Kew's excellent > >Apache Modules Book I've found the function ap_internal_redirect(), but > >does this function also work from an

Re: How to do a sub-request from input filter?

2011-04-27 Thread Graham Leggett
On 27 Apr 2011, at 7:07 PM, Micha Lenk wrote: I am using Apache as a reverse proxy to forward requests to a backend web server protected by some self-written Apache modules. Now I would like to do a sub-request to a different location from within an input filter. What is the easiest way to

Re: How to do a sub-request from input filter?

2011-04-27 Thread Nick Kew
on the request processing cycle, should be clearer. A subrequest should be OK in a filter, but if it generates any output you'd need to figure out where to send it - which is not obvious in an input filter. As for an internal redirect, I don't see how it would make sense, but I haven&

How to do a sub-request from input filter?

2011-04-27 Thread Micha Lenk
Hi, I am using Apache as a reverse proxy to forward requests to a backend web server protected by some self-written Apache modules. Now I would like to do a sub-request to a different location from within an input filter. What is the easiest way to achieve this? Reading Nick Kew's exce

Apache Input Filter

2010-08-31 Thread Varanasi, Sasikala
Hi, I have a need to capture the incoming request body each time a request comes into Apache Proxy server. I have mod_proxy and mod_filters setup and I have an input filter that I wrote that captures the payload from the request and logs it out. The input filter is able to do this, however, the

input filter module, chunked encoding, end-of-request indication?

2010-07-01 Thread David Youatt
Newbie input filter module writer, so apologies if this is the wrong list. >From inside an input filter module, when handling filter routine calls and >iterating over buckets, with chunked encoding, what's the (or a) termination condition for end of request body? Is it a EOS meta

consulting help with input filter for decompression

2010-06-23 Thread David Youatt
We're looking for an experienced consultant who can guide us through writing a new filter module for a custom compression/encryption technique. We have a prototype output filter that's "working", and need help and guidance with the input filter. Our prototype was based on

Re: Recv'ing data directly from a socket and running it through SSL input filter.

2009-11-03 Thread Shane Pope
This has been solved by creating a new input filter, replacing core with it, and calling ap_get_brigade on my new input_filter chain. Apologies for so many messages, Shane

Re: Recv'ing data directly from a socket and running it through SSL input filter.

2009-11-03 Thread Shane Pope
Essentially what I'm asking is, I have data in a char * I have the filters (r->input_filters) I need to run this through. Is there a way to send this data through that filter? I've found some code that will let me place that data in a bucket brigade. apr_bucket_brigade *bb = apr_brigade_c

Re: Input filter to process POST variables (e.g. mod_form)

2009-03-29 Thread Erik Westland
- Original Message > From: Nick Kew > To: modules-...@httpd.apache.org > Sent: Wednesday, March 25, 2009 4:10:39 PM > Subject: Re: Input filter to process POST variables (e.g. mod_form) > > > On 25 Mar 2009, at 14:34, Erik Westland wrote > > > >

How to share context between input filter and output filter

2008-12-17 Thread Ashish Khare
Hi, I am facing problem about how to share context between input filter and output filter which are registered through different hooks. Here is description of the problem: static void mod_realsecure_register_hooks (apr_pool_t * p) { ap_hook_child_init (realsecure_child_init

Re: Problem setting new HTTP headers from an input filter

2007-10-10 Thread Julian Williams
On 10/10/07, Joe Lewis <[EMAIL PROTECTED]> wrote: > Julian Williams wrote: [snip] > > My code uses calls to apr_table_set to create the headers e.g. > > > > apr_table_set(r->subprocess_env, "HTTP_SAMS_USER", uid); > > > > Try : > > apr_table_set(r->headers_in, "HTTP_SAMS_USER", uid); > > >

Re: Problem setting new HTTP headers from an input filter

2007-10-10 Thread Joe Lewis
Julian Williams wrote: > Hi, > I have written an Apache module that controls access depending on > whether a token is present in the request - normally as an HTTP > cookie. I have recently had to modify the module to include an input > filter which will spot the token if included i

Re: Problem setting new HTTP headers from an input filter

2007-10-10 Thread Arturo 'Buanzo' Busleiman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Julian Williams wrote: > Is it just not possible to modify the headers at this point in the > processing 'pipeline' or is there a different way that I can do it? What TYPE of input filter is it? - -- Arturo "Buanzo&q

RE: Input filter cannot change size of multipart/form-data

2007-02-07 Thread Kratzer, James (Xetron)
ECTED] The problem is that mod_proxy generates the Content-Length header before calling the input filters. If an input filter modifies the body of the request, as my filter does, mod_proxy does not regenerate the Content-Length header. A fix was made in mod_proxy to delay generating the Content-L

RE: Input filter cannot change size of multipart/form-data

2007-02-06 Thread Kratzer, James (Xetron)
anks -Original Message- From: Nick Kew [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 12:55 PM To: modules-dev@httpd.apache.org Subject: Re: Input filter cannot change size of multipart/form-data On Tue, 6 Feb 2007 12:38:26 -0500 "Kratzer, James \(Xetron\)" <[EMAIL P

Re: Input filter cannot change size of multipart/form-data

2007-02-06 Thread Nick Kew
On Tue, 6 Feb 2007 12:38:26 -0500 "Kratzer, James \(Xetron\)" <[EMAIL PROTECTED]> wrote: > Please help. > > I have an input filter that looks for the Content-Type > "multipart/form-data" and saves the whole POST request to disk for > processing by scri

Input filter cannot change size of multipart/form-data

2007-02-06 Thread Kratzer, James (Xetron)
Please help. I have an input filter that looks for the Content-Type "multipart/form-data" and saves the whole POST request to disk for processing by scripts invoked by the filter. The processed multipart/form-data is then read back in and sent up the chain. Here are the steps fo

[jira] Created: (MODPYTHON-212) req.read() with no arguments doesn't return all data where input filter inserts extra data in input stream.

2007-01-13 Thread Graham Dumpleton (JIRA)
req.read() with no arguments doesn't return all data where input filter inserts extra data in input stream. --- Key: MODPYTHON-212 URL:

Re: My input filter is being called endlessly

2007-01-09 Thread Nick Kew
On Wed, 10 Jan 2007 02:16:09 +0200 "Kfir Dadosh" <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm trying to write an input filter that buffers the whole post > content, You should avoid buffering where possible. Failing that, you'll want to tell server admin

My input filter is being called endlessly

2007-01-09 Thread Kfir Dadosh
Hi All, I'm trying to write an input filter that buffers the whole post content, replaces it with some other content, and passes it on the chain. I managed to read the data from the brigade and buffer it correctly, until I get the EOS bucket. At that point, I created a new brigade, adde

Input Filter Infinite Loop

2006-11-27 Thread Tess Flynn
I'm new to writing modules, but this is just baffling to me. I'm trying to write an input filter to access POST data from an incoming request. I don't need to modify the data in any way, just trap it and pass the contents to the next filter. The problem is, I only seem to tra

[Fwd: Re: Input Filter reading Body]

2006-10-28 Thread Ruediger Pluem
On 10/20/2006 05:03 PM, Christian Verdelli wrote: > > static int redirect_wmlInFilter (ap_filter_t* f, apr_bucket_brigade* > brigade, > ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) { > > apr_bucket* bucket ; > apr_status_t ret ; > > if ( ret = ap_get_brigade(f->next, briga

Re: Input Filter reading Body

2006-10-23 Thread Christian Verdelli
I simply changed  this piece of code : char *data[4096]; memset (data,0,4096);  with this :    char *data;  data = "" 4096) ; and now it works fine, what the hell is this !!?? :-DThanks anyway..On Oct 20, 2006, at 6:35 PM, Christian Verdelli wrote:Well,actually i took my piece of code right from t

Re: Input Filter reading Body

2006-10-20 Thread Christian Verdelli
Well, actually i took my piece of code right from that module. I just took out the piece i needed but happen exaclty using mod_diagnostic.c I just added the function to read data from the bucket : apr_bucket_read(b,&data,&len,1); ap_log_perror(APLOG_MARK, APLOG_NOTICE, NULL, f->c->pool, "

Re: Input Filter reading Body

2006-10-20 Thread Nick Kew
On Friday 20 October 2006 16:03, Christian Verdelli wrote: > - > -- Hi, > > im writing my first simple input filters ; i need it to debug the > request body (content of POST) coming to my Web Server before is handled > by a third party contect handler module (which corrupt data). > I simply want to

Input Filter reading Body

2006-10-20 Thread Christian Verdelli
>frec->name, t, bucket->length , data );elseap_log_perror(APLOG_MARK, APLOG_NOTICE, NULL, f->c->pool,"(IN) %s: ap_get_brigade returned %d", f->frec->name, ret) ;return ret ;}The filter is then registered as input filter in the AP_FTYPE_TRANSCODE phase.static void redir

Help with input filter ... crashing apache ...

2006-08-09 Thread José Muanis
Hi, hope that someone has any time to help me. I'm designing an input filter, my goal is to parse de URI and Cookies, set a couple of new headers in the request and change the uri. I have coded some stuff, based on Ryan Bloom article 'Writing Input Filters for Apache 2.0' (http:/

Re: input filter which modifies body, Content-Length

2006-02-24 Thread Jeff Trawick
On 2/24/06, Greg Ames <[EMAIL PROTECTED]> wrote: > Jeff Trawick wrote: > > > It isn't clear to me what an input filter should do about > > Content-Length when it modifies the length of the body (assuming that > > this isn't chunked encoding). > > >

Re: input filter which modifies body, Content-Length

2006-02-24 Thread Greg Ames
Jeff Trawick wrote: It isn't clear to me what an input filter should do about Content-Length when it modifies the length of the body (assuming that this isn't chunked encoding). mod_cgi uses brigades to read the body but needs to look at Content-Length before spawning the CGI

input filter which modifies body, Content-Length

2006-02-23 Thread Jeff Trawick
(Apologies if there is juicy past discussion that I didn't find with my search keywords.) It isn't clear to me what an input filter should do about Content-Length when it modifies the length of the body (assuming that this isn't chunked encoding). It causes problems for some han

input filter problems

2005-08-18 Thread Martijn Faassen
Hi there, I've spent the last few days trying to get an input filter to work in mod_python, in the context of requests that are being reverse proxied to an app-server by mod_proxy. I've also tried mod_rewrite. The input filter works fine if mod_proxy or mod_rewrite are *not* in

Re: Accessing to per Directory configuration from an input filter: HOW?

2005-06-23 Thread luca regini
S.   Thanks in advance for your attention. Luca   On 6/22/05, Nick Kew <[EMAIL PROTECTED]> wrote: luca regini wrote:> I need to write an input filter that is able to change the value of some> cookies. However the name of the cookie to be changed is a per- directory > value. S

My Input Filter doesn't get called

2005-06-23 Thread luca regini
I add an input filter with an "ap_add_input_filter" from an ap_hook_header_parser hook. My filter doesn't get called, i guess probably because we are too far in the request processing cycle. Sadly this filter needs per directory config information that is not available within pre

Re: Accessing to per Directory configuration from an input filter: HOW?

2005-06-22 Thread luca regini
te:> I need to write an input filter that is able to change the value of some> cookies. However the name of the cookie to be changed is a per- directory > value. So i have an input filter whose behavior depends programmatically> from per-directory configuration. How should i gain informati

Re: Accessing to per Directory configuration from an input filter: HOW?

2005-06-22 Thread luca regini
te:> I need to write an input filter that is able to change the value of some> cookies. However the name of the cookie to be changed is a per- directory > value. So i have an input filter whose behavior depends programmatically> from per-directory configuration. How should i gain informati

Re: Accessing to per Directory configuration from an input filter: HOW?

2005-06-22 Thread Nick Kew
luca regini wrote: > I need to write an input filter that is able to change the value of some > cookies. However the name of the cookie to be changed is a per- directory > value. So i have an input filter whose behavior depends programmatically > from per-directory configuration.

Accessing to per Directory configuration from an input filter: HOW?

2005-06-22 Thread luca regini
I need to write an input filter that is able to change the value of some cookies. However the name of the cookie to be changed is a per- directory value. So i have an input filter whose behavior depends programmatically from per-directory configuration. How should i gain information about per -dir

Re: [apache-2.1.3] buffering content in input filter

2005-01-13 Thread Pawel Niewiadomski
On Wed, 12 Jan 2005 18:43:53 + (GMT), Nick Kew <[EMAIL PROTECTED]> wrote : > I meant to add: there are C code examples in my stuff at > apache.webthing.com. Can't recollect OTTOMH what's published, but > mod_upload is definitely opensource and its tmpfile_filter does > what you're asking (th

Re: [apache-2.1.3] buffering content in input filter

2005-01-12 Thread Nick Kew
On Wed, 12 Jan 2005, Nick Kew wrote: > [a fairly useless message] I meant to add: there are C code examples in my stuff at apache.webthing.com. Can't recollect OTTOMH what's published, but mod_upload is definitely opensource and its tmpfile_filter does what you're asking (though it's not an idea

Re: [apache-2.1.3] buffering content in input filter

2005-01-12 Thread Nick Kew
On Wed, 12 Jan 2005, Pawel Niewiadomski wrote: > Does anyone know how can I solve this problem? As Stas says, simply don't return to the caller until you've got EOS. You lose the efficiency of pipelining, and beware of how big a request you accept and buffer! -- Nick Kew

Re: [apache-2.1.3] buffering content in input filter

2005-01-12 Thread Stas Bekman
Pawel Niewiadomski wrote: hello, I'm writing an input filter that needs to operate on a full content of incoming request. But it should not pass incoming data to other input filters - it gathers full body of request, changes it and then passes it further. I have one problem - if I empty a br

[apache-2.1.3] buffering content in input filter

2005-01-12 Thread Pawel Niewiadomski
hello, I'm writing an input filter that needs to operate on a full content of incoming request. But it should not pass incoming data to other input filters - it gathers full body of request, changes it and then passes it further. I have one problem - if I empty a brigade that is passed t

POST data input filter questions.

2004-10-21 Thread Nathanael Noblet
s to deal with POST data, which from my reading, means I need an input filter. Which is fine, I can see how to set that up as well. Where I get lost is, how does my handler get the POST data that I'd read using my input filter? I assume it has to do with the context structure that each mod

Re: mod_ssl/input filter review needed

2004-06-03 Thread Justin Erenkrantz
--On Wednesday, June 2, 2004 12:12 PM +0100 Joe Orton <[EMAIL PROTECTED]> wrote: The approach I'm using is a new input filter which runs above (before) the HTTP input filter, and waits for an EOS, then does the SSL handshake. All the data must be read from the socket before s

mod_ssl/input filter review needed

2004-06-02 Thread Joe Orton
andshake *after* the request body has been read. mod_ssl for 1.3 solved this using an inelegant but effective hack which read the entire request body into memory; it seems like a better solution is possible for 2.0. The approach I'm using is a new input filter which runs above (before) t

Re: deflate input filter and jk

2004-03-31 Thread Henri Gomez
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote... > > Hi to all, > > A new question to HTTP / RFC gurus. > > A customer has developped a custom PHP HTTP client, > using HTTP 1.0 and compression. That's like mixing Vodka and Beer... something could easily puke... but OK... I hear ya... T

Re: deflate input filter and jk

2004-03-31 Thread TOKILEY
nt-Length is set to the size of the > plain request (not the size of the compressed request). > > Is it correct or should it send the Content-Length with > the size of the compressed request ? > > In such case, it seems that mod_deflate INPUT filter should > modify the Content-Len

Re: deflate input filter and jk

2004-03-31 Thread Henri Gomez
mod_deflate INPUT filter should modify the Content-Length accordingly ? The note at the bottom of this section: http://httpd.apache.org/docs-2.0/mod/mod_deflate.html#enable says that it should be the compressed length and that the server is not responsible for changing the length during decompression. Ok

Re: deflate input filter and jk

2004-03-31 Thread Joshua Slive
eems that mod_deflate INPUT filter should > modify the Content-Length accordingly ? The note at the bottom of this section: http://httpd.apache.org/docs-2.0/mod/mod_deflate.html#enable says that it should be the compressed length and that the server is not responsible for changing the length during decompression. Joshua.

deflate input filter and jk

2004-03-31 Thread Henri Gomez
HTTP header : Content-Encoding: gzip Also the Content-Length is set to the size of the plain request (not the size of the compressed request). Is it correct or should it send the Content-Length with the size of the compressed request ? In such case, it seems that mod_deflate INPUT filter should

inserting env var to cgi from input filter

2004-02-25 Thread Aryeh Katz
It seems from the code, that any headers an input filter would like to insert in the environment won't be inserted. This is because by the time the input filter has been called (ap_get_brigade on line 696) the environment has been finalized (line with run_cgi_child:ap_create_privileged_pr

Re: should input filter return the exact amount of bytes asked for?

2003-11-14 Thread Stas Bekman
Justin Erenkrantz wrote: Thanks for the explanations Justin. Once I'll get some free time I'll need to revamp the filters chapter [1] to address the read mode issue. So far I was completely ignoring it :( (1) http://perl.apache.org/docs/2.0/user/handlers/filters.html Though it'd be nice to add

Re: should input filter return the exact amount of bytes asked for?

2003-11-14 Thread Justin Erenkrantz
--On Thursday, November 13, 2003 11:01 AM -0800 Stas Bekman <[EMAIL PROTECTED]> wrote: Should we add an explicit explanation to AP_MODE_READBYTES: return at most readbytes data. Can't return 0 with APR_BLOCK_READ. Can't return more than readbytes data. I'd say the first and last one are equivalen

Re: should input filter return the exact amount of bytes asked for?

2003-11-13 Thread Stas Bekman
Justin Erenkrantz wrote: --On Thursday, November 13, 2003 12:38 AM -0800 Stas Bekman <[EMAIL PROTECTED]> wrote: Great. Where this should be documented? In the ap_get_brigade .h? It's already in util_filters.h. Read the documentation for ap_input_mode_t: /** The filter should return at mos

Re: should input filter return the exact amount of bytes asked for?

2003-11-13 Thread Justin Erenkrantz
--On Thursday, November 13, 2003 12:38 AM -0800 Stas Bekman <[EMAIL PROTECTED]> wrote: Great. Where this should be documented? In the ap_get_brigade .h? It's already in util_filters.h. Read the documentation for ap_input_mode_t: /** The filter should return at most readbytes data. */ AP_M

Re: should input filter return the exact amount of bytes asked for?

2003-11-13 Thread Stas Bekman
Justin Erenkrantz wrote: On Tue, Nov 04, 2003 at 01:41:46AM -0800, Stas Bekman wrote: filter. What happens if the filter returns less bytes (while there is still more data coming?) What happens if the filter returns more bytes than requested (e.g. because it uncompressed some data). After all th

Re: should input filter return the exact amount of bytes asked for?

2003-11-11 Thread Justin Erenkrantz
--On Tuesday, November 11, 2003 11:24 AM -0600 "William A. Rowe, Jr." <[EMAIL PROTECTED]> wrote: More bytes = Not OK. (Theoretically possible though with bad filters.) Wrong. This is OK across the board, please consider; Uh, no. We changed the filter semantics some time ago to stop this insani

Re: should input filter return the exact amount of bytes asked for?

2003-11-11 Thread William A. Rowe, Jr.
At 03:31 AM 11/11/2003, Justin Erenkrantz wrote: >On Tue, Nov 04, 2003 at 01:41:46AM -0800, Stas Bekman wrote: >> filter. What happens if the filter returns less bytes (while there is still >> more data coming?) What happens if the filter returns more bytes than >> requested (e.g. because it unco

Re: should input filter return the exact amount of bytes asked for?

2003-11-11 Thread Justin Erenkrantz
On Tue, Nov 04, 2003 at 01:41:46AM -0800, Stas Bekman wrote: > filter. What happens if the filter returns less bytes (while there is still > more data coming?) What happens if the filter returns more bytes than > requested (e.g. because it uncompressed some data). After all the incoming Less by

Re: should input filter return the exact amount of bytes asked for?

2003-11-06 Thread Stas Bekman
Stas Bekman wrote: I'm trying to get rid of ap_get_client_block(), but I don't understand a few things. ap_get_client_block() asks for readbytes from the upstream filter. What happens if the filter returns less bytes (while there is still more data coming?) What happens if the filter returns mor

should input filter return the exact amount of bytes asked for?

2003-11-04 Thread Stas Bekman
I'm trying to get rid of ap_get_client_block(), but I don't understand a few things. ap_get_client_block() asks for readbytes from the upstream filter. What happens if the filter returns less bytes (while there is still more data coming?) What happens if the filter returns more bytes than reques

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-28 Thread Joe Schaefer
[EMAIL PROTECTED] writes: > [...] > > > > Why don't you just write a fixup handler with libapreq-2? > > AFAICT libapreq-2's mod_apreq (filter) handles these details > > for you. > > > > I did have the sense that what I was trying to do running under the > HTTP_IN filter an impossible task to ac

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-28 Thread albertochan
[...] > > Why don't you just write a fixup handler with libapreq-2? > AFAICT libapreq-2's mod_apreq (filter) handles these details > for you. > I did have the sense that what I was trying to do running under the HTTP_IN filter an impossible task to achieve. That is until I took a look at libapr

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-25 Thread Joe Schaefer
[EMAIL PROTECTED] writes: [...] > The question is how can I ask CORE_IN for the request line, > http headers and request body without causing it to be > consumed? Why don't you just write a fixup handler with libapreq-2? AFAICT libapreq-2's mod_apreq (filter) handles these details for you. [.

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-25 Thread albertochan
Hi, >> The only way I can see where I will have the ability >> to insert those HTTP inbound request headers is if >> my filter runs between the CORE_IN and the HTTP_IN >> input filter, > > I'm afraid this is true... Does anyone else have a better idea? Af

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-19 Thread Jeff Trawick
[EMAIL PROTECTED] wrote: Be careful you have configuration to avoid buffering the entire .iso file that somebody tries to copy to their DAV filesystem. And your configuration may be roll-your-own w.r.t. selecting which request objects to operate on since you may have to make your decisions be

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-19 Thread albertochan
> Be careful > you have configuration to avoid buffering the entire .iso file that > somebody tries to copy to their DAV filesystem. And your configuration > may be roll-your-own w.r.t. selecting which request objects to operate > on since you may have to make your decisions before Apache has

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-19 Thread Jeff Trawick
[EMAIL PROTECTED] wrote: The only way I can see where I will have the ability to insert those HTTP inbound request headers is if my filter runs between the CORE_IN and the HTTP_IN input filter, I'm afraid this is true... Does anyone else have a better idea? in which case I will need a pro

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-18 Thread albertochan
Hi, > > Does your module needs to read and examine the request body (POST data) > prior to inserting the HTTP request headers, Yes, the module needs the ability to look at the request body, and based on its content, add the necessary HTTP request headers if required for the web application to

Re: Input filter and setting HTTP headers in Apache 2.0

2003-09-18 Thread Jeff Trawick
[EMAIL PROTECTED] wrote: I am writing a module need to be able to examine POST data, and insert inbound HTTP request headers after my code has been run by apache so that: Does your module needs to read and examine the request body (POST data) prior to inserting the HTTP request headers, or are th

Input filter and setting HTTP headers in Apache 2.0

2003-09-17 Thread albertochan
ation * mod_cgi/mod_cgid * mod_proxy (the back web webserver will act as the web application) Attempted Solution Use an input filter. This provides the mechanism to examine the POST data at my will without consuming it off the socket, thus giving the web application still the opportunity to co

How? input filter which parses headers

2003-07-24 Thread Maurizio Codogno
Hi all, I am trying to create an input filter which looks at the header lines of a request (from the Request line itself!), and modifies them if necessary. Unfortunately, the examples I found on the web seem to use an old version of the API, and thus they do not compile. Moreover, what I found in

Re: headers for an input filter in AP_FTYPE_CONNECTION mode ?

2003-06-24 Thread Jeff Trawick
headers are already known by the time we get to a connection filter. On input, the connection filter sees the request data from the client before any parsing has been performed. So my point of respecting the astute user's desire to make an input filter something other than AP_FTYPE_RES

headers for an input filter in AP_FTYPE_CONNECTION mode ?

2003-06-24 Thread Philipp Reisner
input filter on a name based vhost. -- Does anyone know it if does work with an IP based vhost ? TIA -Philipp -- : Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Schönbrunnerstr 244, 1120 Vienna, Austria

input filter

2002-11-25 Thread Estrade Matthieu
hi, Is there a way to place an input filter before mod_proxy do the connection to backend. I did a register_input_filter and it's called when mod_proxy is proxying the data from backend server (ap_get_brigade in proxy_http.c). my aim is to modify the data before the proxy send it to ba

Re: SSL Input Filter bogosity

2002-10-31 Thread Justin Erenkrantz
--On Thursday, October 31, 2002 12:19 AM -0600 "William A. Rowe, Jr." <[EMAIL PROTECTED]> wrote: OpenSSL 0.9.6g does so. Why shouldn't we? Because OpenSSL is a library, we're not. However, if we don't have inl worth of bytes, and they are sitting ready (on the socket) shouldn't we fetch them

Re: SSL Input Filter bogosity

2002-10-30 Thread Aaron Bannert
On Wed, Oct 30, 2002 at 09:04:02PM -0800, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote: > Well, I'm of the view that one should avoid declaring variables within a > loop whenever possible. (you know - individual preferences etc.). FWIW, I am too. :) -aaron

  1   2   >