tags:

views:

3188

answers:

6

What is the maximum length of a URL in apache? Where is it documented, and is it configurable?

I'm implementing an openid identity provider, and would like to know the limitations I'm up against. I know about the 2048 byte path limit on Internet Explorer. That can be handled specially using user agent detection. Other browsers have much higher URL limits.

So what I'm interested in is apache server limits when coding an application.

+1  A: 

Approximately 4,000.

Source: I'm Feeling Lucky

mcandre
A: 

Googled "apache maximum url length" and got the following (a little old, but still relevent):

WWW FAQs: What is the maximum length of a URL?

Justin Niessner
+3  A: 

The official length according to the offical Apache docs is 8,192, but many folks have run into trouble at ~4,000.

MS Internet Explorer is usually the limiting factor anyway, as it caps the maximum URL size at 2,048.

RightFullRudder
+6  A: 
  • Internet Explorer: 2,083 characters, with no more than 2,048 characters in the path portion of the URL
  • Firefox: 65,536 characters show up, but longer URLs do still work even up past 100,000
  • Safari: > 80,000 characters
  • Opera: > 190,000 characters
  • IIS: 16,384 characters, but is configurable
  • Apache: 4,000 characters

From: http://www.danrigsby.com/blog/index.php/2008/06/17/rest-and-max-url-size/

lo_fye
+6  A: 

The default limit for the length of the request line is 8190 bytes (see LimitRequestLine). And if we substract three bytes for the request method (e.g. GET), eight bytes for the version information (e.g. HTTP/1.1) and two bytes for the separaring space, be end up with 8177 bytes for the URI path plus query.

Gumbo
You're right. I tested it with Apache 2.2.11 and adjusting LimitRequestLine works well. For kicks, I've successfully used it with 128K urls.
Stef
Did you have to recompile to use such large values? My version (2.2.15) silently ignores LimitRequestLine directives over 8190 unless recompiled with the added CFLAG "-D DEFAULT_LIMIT_REQUEST_LINE=16384" (then it allows up to 16384).
sh-beta
A: 

found several answers

this one says 2083 and 33,000 characters this one says 2048 via GET

pageman