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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
- 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?".
回答2:
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
回答3:
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