The requested URL's length exceeds the capacit

2019-09-15 01:00发布

问题:

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:

  1. On the receiving end you normally receive a 414 Request-URI Too Long-header.
  2. 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.
  3. Yes, is it server dependent, and even UA-dependent, and if you run Suhusoin with PHP, even more possible rules apply.
  4. 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



标签: http url