Re: Limiting response body length

2007-02-13 Thread Dziugas Baltrunas
Hi list, thanks for the replies. Looks like squid in case Content-Length response header is missing, does it's limitation in a hard way (snip from src/client_side.c): } else if (clientReplyBodyTooLarge(http, http-out.offset - 4096)) { /* 4096 is a margin for the HTTP headers included

Re: Limiting response body length

2007-02-13 Thread Ivan Ristic
On 2/13/07, Dziugas Baltrunas [EMAIL PROTECTED] wrote: Hi list, thanks for the replies. Looks like squid in case Content-Length response header is missing, does it's limitation in a hard way (snip from src/client_side.c): } else if (clientReplyBodyTooLarge(http, http-out.offset - 4096)) {

Re: Limiting response body length

2007-02-13 Thread Nick Kew
On Tue, 13 Feb 2007 11:30:32 + Ivan Ristic [EMAIL PROTECTED] wrote: No. If there's no C-L ModSecurity will count the bytes as they arrive. If there are too many the entire response will be blocked with 500 (and the error page sent to the client). That's a tradeoff you make against

Re: Limiting response body length

2007-02-13 Thread Ivan Ristic
On 2/13/07, Nick Kew [EMAIL PROTECTED] wrote: On Tue, 13 Feb 2007 11:30:32 + Ivan Ristic [EMAIL PROTECTED] wrote: No. If there's no C-L ModSecurity will count the bytes as they arrive. If there are too many the entire response will be blocked with 500 (and the error page sent to the

Re: Limiting response body length

2007-02-12 Thread Henrik Nordstrom
mån 2007-02-12 klockan 12:41 +0200 skrev Dziugas Baltrunas: To illustrate, squid for this purpose has reply_body_max_size [1] parameter. Looks like it is only Content-Length response header (if any) dependent, It also terminates requests when the amount of data transferred hits the specified

Re: Limiting response body length

2007-02-12 Thread Ding Deng
Dziugas Baltrunas [EMAIL PROTECTED] writes: Hi list, I'm wondering if there any plans to implement implement a response body length limitation inside mod_proxy? For now we have only a global LimitRequestBody and what I'm looking is an analog LimitResponseBody. In case Apache HTTP works as

Re: Limiting response body length

2007-02-12 Thread Ivan Ristic
On 2/12/07, Ding Deng [EMAIL PROTECTED] wrote: Dziugas Baltrunas [EMAIL PROTECTED] writes: Hi list, I'm wondering if there any plans to implement implement a response body length limitation inside mod_proxy? For now we have only a global LimitRequestBody and what I'm looking is an analog

Re: Limiting response body length

2007-02-12 Thread Joost de Heer
Dziugas Baltrunas schreef: Hi list, I'm wondering if there any plans to implement implement a response body length limitation inside mod_proxy? Output filter which checks the size and returns an error when it's larger than a predefined size? Joost

Re: Limiting response body length

2007-02-12 Thread Nick Kew
On Mon, 12 Feb 2007 18:26:54 +0100 Joost de Heer [EMAIL PROTECTED] wrote: Dziugas Baltrunas schreef: Hi list, I'm wondering if there any plans to implement implement a response body length limitation inside mod_proxy? Output filter which checks the size and returns an error when it's

Re: Limiting response body length

2007-02-12 Thread Henrik Nordstrom
mån 2007-02-12 klockan 17:51 + skrev Nick Kew: 2. Where there's chunked encoding, the check would best be implemented in the chunking filter. 3. A simple count/abort filter is then a last resort. And it won't be able to tell the client what's happened, because the header has already

Re: Limiting response body length

2007-02-12 Thread Nick Kew
On Mon, 12 Feb 2007 22:09:57 +0100 Henrik Nordstrom [EMAIL PROTECTED] wrote: mån 2007-02-12 klockan 17:51 + skrev Nick Kew: 2. Where there's chunked encoding, the check would best be implemented in the chunking filter. 3. A simple count/abort filter is then a last resort. And it

Re: Limiting response body length

2007-02-12 Thread Henrik Nordstrom
mån 2007-02-12 klockan 21:55 + skrev Nick Kew: Because the chunking filter is equipped to discard the chunk that takes it over the limit, and substitute end-of-chunking. If we do that in a new filter, we have to reinvent that wheel. Not sure substitue end-of-chunking is a reasonable thing

Re: Limiting response body length

2007-02-12 Thread Nick Kew
On Mon, 12 Feb 2007 23:35:24 +0100 Henrik Nordstrom [EMAIL PROTECTED] wrote: mån 2007-02-12 klockan 21:55 + skrev Nick Kew: Because the chunking filter is equipped to discard the chunk that takes it over the limit, and substitute end-of-chunking. If we do that in a new filter, we