Re: [us...@httpd] Limiting Request Body suggestion

2010-11-15 Thread Matus UHLAR - fantomas
  On Thu, October 28, 2010 16:24, Tom Evans wrote:
   Why do you care what the status code is? (or rather, why do you want
   to return OK when an error occurs?)
 
  On 28.10.10 16:48, Joost de Heer wrote:
  To work around the Display userfriendly error messages bug^Wfeature?

 On Tue, Nov 9, 2010 at 2:17 AM, Matus UHLAR - fantomas
 uh...@fantomas.sk wrote:
  Is there any need for work around this?
 
  They may come with greater limits later. Simply give them what they have
  chosen: bullshit error messages.
  Providing .reg file that removes the lame setting is the best we can do
  about this.
 
  sorry for being semi-OT

On 09.11.10 10:14, Mohit Anchlia wrote:
 Doesn't work for us. We have clients who pay for our products and
 electronically send there information to us and it's the requirement
 from the client products to send them back the graceful turnaway with
 good error message back to the user. This is hard requirement and
 that's why I am stuck. I am thinking of may be writing something of my
 own. Do you think I can write some cgi handler?

apache provides localized error messages for error codes. You can translate
them and add some bullshit to them to be over 512 bytes big.

But since it's the web browser, who eats those messages and shows user own
versions, who can tell when will microsoft come with bigger limit for error
messages?

My point is, you can (and apparently do) give useful error messages, but you
can't to much for clients' browsers not to sabotage it.

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. -- Benjamin Franklin, 1759

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-11-15 Thread Mohit Anchlia
On Mon, Nov 15, 2010 at 3:56 AM, Matus UHLAR - fantomas
uh...@fantomas.sk wrote:
  On Thu, October 28, 2010 16:24, Tom Evans wrote:
   Why do you care what the status code is? (or rather, why do you want
   to return OK when an error occurs?)
 
  On 28.10.10 16:48, Joost de Heer wrote:
  To work around the Display userfriendly error messages bug^Wfeature?

 On Tue, Nov 9, 2010 at 2:17 AM, Matus UHLAR - fantomas
 uh...@fantomas.sk wrote:
  Is there any need for work around this?
 
  They may come with greater limits later. Simply give them what they have
  chosen: bullshit error messages.
  Providing .reg file that removes the lame setting is the best we can do
  about this.
 
  sorry for being semi-OT

 On 09.11.10 10:14, Mohit Anchlia wrote:
 Doesn't work for us. We have clients who pay for our products and
 electronically send there information to us and it's the requirement
 from the client products to send them back the graceful turnaway with
 good error message back to the user. This is hard requirement and
 that's why I am stuck. I am thinking of may be writing something of my
 own. Do you think I can write some cgi handler?

 apache provides localized error messages for error codes. You can translate
 them and add some bullshit to them to be over 512 bytes big.

 But since it's the web browser, who eats those messages and shows user own
 versions, who can tell when will microsoft come with bigger limit for error
 messages?

 My point is, you can (and apparently do) give useful error messages, but you
 can't to much for clients' browsers not to sabotage it.
Actually consumer of this message is a client API which then formats
it to be displayed on the browser. So client product sends file to us
we then sent the message back Too big ... as part of the API
response. Client product parses this and then displays it on the
browser.

 --
 Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
 Warning: I wish NOT to receive e-mail advertising to this address.
 Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
 They that can give up essential liberty to obtain a little temporary
 safety deserve neither liberty nor safety. -- Benjamin Franklin, 1759

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
      from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-11-09 Thread Matus UHLAR - fantomas
 On Thu, October 28, 2010 16:24, Tom Evans wrote:
  Why do you care what the status code is? (or rather, why do you want
  to return OK when an error occurs?)

On 28.10.10 16:48, Joost de Heer wrote:
 To work around the Display userfriendly error messages bug^Wfeature?

Is there any need for work around this?

They may come with greater limits later. Simply give them what they have
chosen: bullshit error messages. 
Providing .reg file that removes the lame setting is the best we can do
about this.

sorry for being semi-OT

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Your mouse has moved. Windows NT will now restart for changes to take
to take effect. [OK]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-11-09 Thread Mohit Anchlia
On Tue, Nov 9, 2010 at 2:17 AM, Matus UHLAR - fantomas
uh...@fantomas.sk wrote:
 On Thu, October 28, 2010 16:24, Tom Evans wrote:
  Why do you care what the status code is? (or rather, why do you want
  to return OK when an error occurs?)

 On 28.10.10 16:48, Joost de Heer wrote:
 To work around the Display userfriendly error messages bug^Wfeature?

 Is there any need for work around this?

 They may come with greater limits later. Simply give them what they have
 chosen: bullshit error messages.
 Providing .reg file that removes the lame setting is the best we can do
 about this.

 sorry for being semi-OT
Doesn't work for us. We have clients who pay for our products and
electronically send there information to us and it's the requirement
from the client products to send them back the graceful turnaway with
good error message back to the user. This is hard requirement and
that's why I am stuck. I am thinking of may be writing something of my
own. Do you think I can write some cgi handler?

 --
 Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
 Warning: I wish NOT to receive e-mail advertising to this address.
 Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
 Your mouse has moved. Windows NT will now restart for changes to take
 to take effect. [OK]

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
      from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-31 Thread Mohit Anchlia
On Fri, Oct 29, 2010 at 3:21 AM, Green Wang cocow...@gmail.com wrote:
 maybe you can use a script like php or what
 and set the ErrorDocument to this script
 then use header() function to set the response status code


IS there an example I can use? Or is there a better way of handling it?

 On 10/28/2010 10:24 PM, Tom Evans wrote:

 You want it to fail and return 200? Seems counter-intuitive...


 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
     from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-29 Thread Green Wang

maybe you can use a script like php or what
and set the ErrorDocument to this script
then use header() function to set the response status code

On 10/28/2010 10:24 PM, Tom Evans wrote:

You want it to fail and return 200? Seems counter-intuitive...



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-29 Thread Tom Evans
On Thu, Oct 28, 2010 at 4:41 PM, William A. Rowe Jr.
wr...@rowe-clan.net wrote:
 On 10/28/2010 10:17 AM, Tom Evans wrote:
 That has well known solutions doesn't it? Pad your page to more than
 512 bytes, and Robert is the brother of your mother.

 I don't know that 512 will do the trick in all cases.

 At one point IE had me convinced that if the size of its message was longer
 than the size of the server provided message, it would override with IE's
 choice.  Something in the neighborhood of 1k seemed to always work to show
 the server provided messages.


Greater than 512 bytes will override IE 6, 7, 8 and Chrome's helpful
error messages. In fact, for certain error response codes, only
greater than 256 bytes is required for IE to display the server
supplied message. Depending on IE version, these values are in the
registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\Main\ErrorThresholds.

It's important to note that certain versions of IE use the value of
the Content-Length header, rather than the actual size of the message
body. This can cause a difference if the content is gzip'ed, so you
must ensure that the gzip'ed content is still large enough.

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-28 Thread Tom Evans
On Thu, Oct 28, 2010 at 12:54 AM, Mohit Anchlia mohitanch...@gmail.com wrote:
 It looks like ErrorDocument changes the behaviour globally. What I
 need to do is return Http code 200 with customized message which
 clients can parse and display cleanly on the browser.


You want it to fail and return 200? Seems counter-intuitive...

Why do you care what the status code is? (or rather, why do you want
to return OK when an error occurs?)

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-28 Thread Joost de Heer
On Thu, October 28, 2010 16:24, Tom Evans wrote:

 Why do you care what the status code is? (or rather, why do you want
 to return OK when an error occurs?)

To work around the Display userfriendly error messages bug^Wfeature?

Joost

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-28 Thread Tom Evans
That has well known solutions doesn't it? Pad your page to more than
512 bytes, and Robert is the brother of your mother.

Cheers

Tom

On Thu, Oct 28, 2010 at 3:48 PM, Joost de Heer jo...@sanguis.xs4all.nl wrote:
 On Thu, October 28, 2010 16:24, Tom Evans wrote:

 Why do you care what the status code is? (or rather, why do you want
 to return OK when an error occurs?)

 To work around the Display userfriendly error messages bug^Wfeature?

 Joost

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
      from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-28 Thread William A. Rowe Jr.
On 10/28/2010 10:17 AM, Tom Evans wrote:
 That has well known solutions doesn't it? Pad your page to more than
 512 bytes, and Robert is the brother of your mother.

I don't know that 512 will do the trick in all cases.

At one point IE had me convinced that if the size of its message was longer
than the size of the server provided message, it would override with IE's
choice.  Something in the neighborhood of 1k seemed to always work to show
the server provided messages.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Limiting Request Body suggestion

2010-10-27 Thread Mohit Anchlia
Apache 2.2

Requirement I am working on is to block the request body if it is
greatar than certain size. I can do this easily with LimitRequestBody
directive in virtual hosts but the problem comes when I want to send
customized message to the user instead of returning non 200 http code.

Can someone suggest what would be the best options?

I am thinking I could also take the code of mod limit and modify it.
Do you think that's advisable?

Is there any other better option that also scales.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-27 Thread Nick Kew
On Wed, 27 Oct 2010 12:28:47 -0700
Mohit Anchlia mohitanch...@gmail.com wrote:

 Can someone suggest what would be the best options?

ErrorDocument

-- 
Nick Kew

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Limiting Request Body suggestion

2010-10-27 Thread Mohit Anchlia
It looks like ErrorDocument changes the behaviour globally. What I
need to do is return Http code 200 with customized message which
clients can parse and display cleanly on the browser.

On Wed, Oct 27, 2010 at 12:36 PM, Nick Kew n...@webthing.com wrote:
 On Wed, 27 Oct 2010 12:28:47 -0700
 Mohit Anchlia mohitanch...@gmail.com wrote:

 Can someone suggest what would be the best options?

 ErrorDocument

 --
 Nick Kew

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
      from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org