tags:

views:

2937

answers:

3
+3  Q: 

HTTP URI GET limit

Is there a length limit of characters for an HTTP GET requests?

+6  A: 

Not in the RFC, no, but there are practical limits.

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.

Ed Guiness
+7  A: 

This sums it up pretty well:

http://www.boutell.com/newfaq/misc/urllength.html

Summary: It's implementation dependent, as there is no specified limit in the RFC. It'd be safe to use up to 2000 characters (IE's limit). Anyhow if you are considering to use URIs that long, you better consider again and use POST instead if possible.

URIs are meant to be readable not to send information.

Vinko Vrsalovic
+2  A: 

The specification does not limit the length of an HTTP Get request but the different browsers implement their own limitations. For example Internet Explorer has a limitation implemented at 2083 characters.

Joakim Karlsson