Is there any way to detect when URL's length is exceeded? This is causing after sending large number of query variables in query string. Can it be increased at run time? It seems dependent on server configuration & what is maximum length for URL?
Asked
Active
Viewed 5.7k times
4 Answers
19
- On the receiving end you normally receive a
414 Request-URI Too Long
-header. - No it cannot be increased at runtime. And in Apache, if you use that as a webservers, you can limit it to something below the default 8190 bytes, but not to something above it without changing the source code & recompiling.
- Yes, is it server dependent, and even UA-dependent, and if you run
Suhusoin
withPHP
, even more possible rules apply. - If you need to ask "What is the maximum lenght of an url?", you actually need to ask: "Why are these not POST values?".

Wrikken
- 69,272
- 8
- 97
- 136
4
Problem arises if form method is not set and it tries to fetch variables from session. To solve this set your form method as method="POST", it will work

yugandhara
- 41
- 1
2
This problem might be caused by the Apache limits the set a size of a client’s HTTP request-line (e.g. ) and the HTTP request header field size. So you will need to increase the default values if the request URL is this large. Increase the URI length limit in the Apache configuration file (by default it is /etc/httpd/conf/httpd.conf ):
LimitRequestLine 16380
LimitRequestFieldSize 16380

CS Student
- 112
- 1
- 14
0
This problem arises if form method is not set and it tries to fetch variables from session. To solve this set your form method as method="POST", it will work

yugandhara
- 91
- 1
- 4