ap_setup_client_block and Content-Length

2008-02-15 Thread Charles Fry
Hi, I desire to access a request's Content-Length from an input filter. The only way I've been able to determine to do this short of manually parsing the header myself is to call ap_setup_client_block and then read r-remaining, but I don't see any precedent for doing this in other modules (that

Module example to submit a muitipart/form-data

2008-02-15 Thread Moacir Schmidt
Hi, everybody! Does anyone have an example of module to handle a mutipart/form-data submission that works with apache 2.2? I found some (like mod_upload at http://apache.webthing.com/mod_upload/) but all of them hangs when submitting a file larger than 22k on my tests (this problem has its own

RE: ap_setup_client_block and Content-Length

2008-02-15 Thread Brian Smith
Nick Kew wrote: Charles Fry [EMAIL PROTECTED] wrote: Hi, I desire to access a request's Content-Length from an input filter. When it exists, you can get it with apr_table_get(r-headers_in, Content-Length) There is no way to get an accurate content length if other input filters have

Re: Module example to submit a muitipart/form-data

2008-02-15 Thread Chris Kukuchka
From: Moacir Schmidt [EMAIL PROTECTED] Does anyone have an example of module to handle a mutipart/form-data submission that works with apache 2.2? I am not sure what type of handling you are looking for. However, here is the block my module uses to pass the request content. It adequately

Re: ping for http in mod_proxy

2008-02-15 Thread Jim Jagielski
On Feb 14, 2008, at 6:41 PM, Graham Leggett wrote: Akins, Brian wrote: Yeah that was my thought. I guess you pass around the array of servers. Just remove (or mark as N/A) from the list and/or reorder it. At the end, core proxy picks whatever is in index 0 (possibly walking the list

Re: ping for http in mod_proxy

2008-02-15 Thread Plüm , Rüdiger , VF-Group
-Ursprüngliche Nachricht- Von: Jim Jagielski Gesendet: Freitag, 15. Februar 2008 14:05 An: dev@httpd.apache.org Betreff: Re: ping for http in mod_proxy On Feb 14, 2008, at 6:41 PM, Graham Leggett wrote: Akins, Brian wrote: Yeah that was my thought. I guess you pass

Re: ping for http in mod_proxy

2008-02-15 Thread Jim Jagielski
On Feb 15, 2008, at 8:13 AM, Plüm, Rüdiger, VF-Group wrote: -Ursprüngliche Nachricht- Von: Jim Jagielski Gesendet: Freitag, 15. Februar 2008 14:05 An: dev@httpd.apache.org Betreff: Re: ping for http in mod_proxy Well, right now all it does is say give me the best worker and

Re: ping for http in mod_proxy

2008-02-15 Thread Plüm , Rüdiger , VF-Group
-Ursprüngliche Nachricht- Von: Akins, Brian Gesendet: Freitag, 15. Februar 2008 16:44 An: dev@httpd.apache.org Betreff: Re: ping for http in mod_proxy On 2/15/08 8:13 AM, Plüm, Rüdiger, VF-Group [EMAIL PROTECTED] wrote: Any specific reason why we need to add an hook

Re: ping for http in mod_proxy

2008-02-15 Thread Akins, Brian
On 2/15/08 8:13 AM, Plüm, Rüdiger, VF-Group [EMAIL PROTECTED] wrote: Any specific reason why we need to add an hook here and why this cannot be done by the existing provider (interface). I am scared of adding another level of indirection here if it is not really needed and things can be

RE: ap_get_brigade hangs when submitting a muitipart/form-data

2008-02-15 Thread Brian Smith
Jarek Kucypera wrote: ap_get_brigade is designed to be used in input filters. If you want read request data in your content handler, you must use ap_should_client_block and ap_get_client_block. There are lots of modules that ship with Apache that are using ap_get_brigade, and the source code

Re: ping for http in mod_proxy

2008-02-15 Thread Jim Jagielski
On Feb 15, 2008, at 10:43 AM, Akins, Brian wrote: On 2/15/08 8:13 AM, Plüm, Rüdiger, VF-Group [EMAIL PROTECTED] wrote: Any specific reason why we need to add an hook here and why this cannot be done by the existing provider (interface). I am scared of adding another level of

Re: ping for http in mod_proxy

2008-02-15 Thread Akins, Brian
On 2/15/08 11:03 AM, Plüm, Rüdiger, VF-Group [EMAIL PROTECTED] wrote: My main point is that I want to avoid using both hook and provider if not really needed, as it Agreed. Was just stating my preference. As long as it's easy to use, I have no strong feelings either way. -- Brian Akins

Re: Proxy's pre_request and post_request hooks

2008-02-15 Thread Nick Kew
On Thu, 14 Feb 2008 15:07:38 -0500 Jim Jagielski [EMAIL PROTECTED] wrote: Right now, both of these are defined as APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST and the ones we use are at APR_HOOK_FIRST. They also always return OK (unless an error) so this means that we can never add additional hooks

Re: Proxy's pre_request and post_request hooks

2008-02-15 Thread Jim Jagielski
On Feb 15, 2008, at 1:21 PM, Nick Kew wrote: On Thu, 14 Feb 2008 15:07:38 -0500 Jim Jagielski [EMAIL PROTECTED] wrote: Right now, both of these are defined as APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST and the ones we use are at APR_HOOK_FIRST. They also always return OK (unless an error) so this

Re: Proxy's pre_request and post_request hooks

2008-02-15 Thread Jim Jagielski
On Feb 14, 2008, at 3:07 PM, Jim Jagielski wrote: Soo I'm proposing changing to RUN_ALL... Bueller...? Bueller...?

Re: ping for http in mod_proxy

2008-02-15 Thread Justin Erenkrantz
On Fri, Feb 15, 2008 at 8:26 AM, Jim Jagielski [EMAIL PROTECTED] wrote: Not quite... there's nothing in providers, per se, that limit how they are *used* to be oneshot... Just ask Brad and aaa :) +1. I personally find the vtable interface easier to deal with - you have a 'set' of functions

Re: ap_setup_client_block and Content-Length

2008-02-15 Thread Charles Fry
Right, but then I have to parse it myself, and basically repeat all of the work of ap_setup_client_block, which I would have preferred to avoid... Charles On Fri, Feb 15, 2008 at 11:25 AM, Nick Kew [EMAIL PROTECTED] wrote: On Fri, 15 Feb 2008 11:18:47 -0500 Charles Fry [EMAIL PROTECTED]

Re: Proxy's pre_request and post_request hooks

2008-02-15 Thread Graham Leggett
Jim Jagielski wrote: Soo I'm proposing changing to RUN_ALL... Comments? It makes sense, the question though would be whether it could be done in a way that is backwards compatible. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature