Catching "File name too long" errors

This is a discussion on Catching "File name too long" errors within the Apache Web Server forums, part of the Web Server and Related Forums category; Is there a way to redirect on "file name too long" errors? I'm using mod_rewrite to handle ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-13-2006
Bob Arn
 
Posts: n/a
Default Catching "File name too long" errors


Is there a way to redirect on "file name too long" errors?

I'm using mod_rewrite to handle all unknown urls with an error page.
That's not working for this error. Apparently the "file name too long"
error occurs before mod_rewrite is invoked.

Setting up an ErrorDocument is also ignored, even though it looks to the
user (and listed in access.log) as a 403 error, it's not a normal 403
error.

Thanks

Bob
  #2 (permalink)  
Old 10-13-2006
Joshua Slive
 
Posts: n/a
Default Re: Catching "File name too long" errors



On Oct 13, 3:20 pm, Bob Arn <nom...@nomail.bob> wrote:
> Is there a way to redirect on "file name too long" errors?
>
> I'm using mod_rewrite to handle all unknown urls with an error page.
> That's not working for this error. Apparently the "file name too long"
> error occurs before mod_rewrite is invoked.
>
> Setting up an ErrorDocument is also ignored, even though it looks to the
> user (and listed in access.log) as a 403 error, it's not a normal 403
> error.


What is the exact error message? I don't know of any "file name too
long" error. Perhaps you are thinking of the error that occurs when
the URI is bigger than the configured limit:
http://httpd.apache.org/docs/2.2/mod...mitrequestline

In general, these types of errors will not use ErrorDocuments supplied
by the admin. This is because the limits are made in the first place
to prevent resource usage or other bugs that may be triggered by
very-large inputs from the client. If you allow those requests to pass
through the normal request-processing phases (in order to trigger the
ErrorDocument) you expose the server to the very-large inputs. So
instead, they are simply immediately rejected with a hard-coded
message.

If you know your server can handle it, you can simply increase
LimitRequestLine to a very-large value.

Joshua.

  #3 (permalink)  
Old 10-13-2006
Bob Arn
 
Posts: n/a
Default Re: Catching "File name too long" errors

In article <1160769311.693034.173950@i3g2000cwc.googlegroups. com>,
"Joshua Slive" <jslive@gmail.com> wrote:

> On Oct 13, 3:20 pm, Bob Arn <nom...@nomail.bob> wrote:
> > Is there a way to redirect on "file name too long" errors?
> >
> > I'm using mod_rewrite to handle all unknown urls with an error page.
> > That's not working for this error. Apparently the "file name too long"
> > error occurs before mod_rewrite is invoked.
> >
> > Setting up an ErrorDocument is also ignored, even though it looks to the
> > user (and listed in access.log) as a 403 error, it's not a normal 403
> > error.

>
> What is the exact error message? I don't know of any "file name too
> long" error. Perhaps you are thinking of the error that occurs when
> the URI is bigger than the configured limit:
> http://httpd.apache.org/docs/2.2/mod...mitrequestline
>
> In general, these types of errors will not use ErrorDocuments supplied
> by the admin. This is because the limits are made in the first place
> to prevent resource usage or other bugs that may be triggered by
> very-large inputs from the client. If you allow those requests to pass
> through the normal request-processing phases (in order to trigger the
> ErrorDocument) you expose the server to the very-large inputs. So
> instead, they are simply immediately rejected with a hard-coded
> message.
>
> If you know your server can handle it, you can simply increase
> LimitRequestLine to a very-large value.


In my error.log:

[Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
too long: access to /879847594875.......

The limit for file names is not "very-large", it is only 255 chars. I
want it to be as long as LimitRequestLine. How can I do that?

Bob
  #4 (permalink)  
Old 10-15-2006
Joshua Slive
 
Posts: n/a
Default Re: Catching "File name too long" errors



On Oct 13, 5:28 pm, Bob Arn <nom...@nomail.bob> wrote:

> [Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
> too long: access to /879847594875.......
>
> The limit for file names is not "very-large", it is only 255 chars. I
> want it to be as long as LimitRequestLine. How can I do that?


This is probably a limit in your operating system, rather than an
apache limit. But for this type of error, you should be able to use a
custom ErrorDocument. Have you tried placing the ErrorDocument
directive in the main part of httpd.conf (outside any <Directory>
section)?

Joshua.

  #5 (permalink)  
Old 10-15-2006
Bob Arn
 
Posts: n/a
Default Re: Catching "File name too long" errors

In article <1160923606.292537.188620@i42g2000cwa.googlegroups .com>,
"Joshua Slive" <jslive@gmail.com> wrote:

> On Oct 13, 5:28 pm, Bob Arn <nom...@nomail.bob> wrote:
>
> > [Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
> > too long: access to /879847594875.......
> >
> > The limit for file names is not "very-large", it is only 255 chars. I
> > want it to be as long as LimitRequestLine. How can I do that?

>
> This is probably a limit in your operating system, rather than an
> apache limit. But for this type of error, you should be able to use a
> custom ErrorDocument. Have you tried placing the ErrorDocument
> directive in the main part of httpd.conf (outside any <Directory>
> section)?


Thanks for the suggestion. I have ErrorDocument in .htaccess. There,
ErrorDocument is the first line and works for other normal errors but
not this one. On my shared host I don't have access to httpd.conf. Will
that make a difference?

Bob
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:23 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0