Restrictions on the length of the request get in the end is how much? ---- a misunderstanding, a lesson

Up until today, because I've been seeing from somewhere get, post difference in writing: get limited length, 1024B. Sorry, after a personal inspection has not been directly regarded as the correct definition (reminds me personally: After theoretical concepts, still need a good validation or confirmation, to be able in the complex network of knowledge, earnest truth-seeking, to prevent many rumors! !!).

       Today, I see the summary of knowledge csdn former colleague Daniel years ago and found that the request has been embraced 1024Get length, is wrong. Here to explain copied from the official website of the authority to make corrections.
       1, the data size of length Http get method to submit no limitation, the Http protocol specification does not limit the length of the URL.
            Currently say get length is limited, specific restrictions browsers and servers to it.
        The maximum processing capacity of a variety of browsers and server are as follows:
        IE: The maximum limit on the URL to 2083 characters If you exceed that number, the submit button nothing happens.
        Firefox: Firefox browser restrictions on the length of the URL is: 65536 characters.
        Safari: URL maximum length is limited to 80,000 characters.
        Opera: URL maximum length is limited to 190,000 characters.
        Google (chrome): URL maximum length is limited to 8182 characters.
        Apache (Server): url acceptable maximum length of 8192 characters (this accuracy to be determined ???)
        Microsoft Internet Information Server (IIS): n can accept a maximum url length of 16,384 characters.
        2, in theory, post is no size limit. Http protocol specification nor has size limitations, be limiting the processing power of the server process.
        Tomcat post default length 2M, by modifying conf / server.xml in "maxPostSize = 0" to cancel the restriction on the size of the post.
 
 
Note that if :( gauge length, then returned from the server identifier 414)
1, first, even if the length restriction, the restriction is the entire length of the URI, rather than the data length of parameter value you.
2, HTTP protocol has never prescribed length limit request GET / POST is how much
3, the so-called request length limit is determined and set by the browser and the web server, the browser and the web server settings are not the same,
     This depends on the respective predetermined browser manufacturer or may be set according to the processing capability of the web server.
 
GET VS POST expansion:
1, most browsers for sending data using POST two stages, the first transmission request header and then sends the request body, even less then a short parameters and then, will be transmitted in two steps (as opposed to the GET), namely a first step data transmission header, and then transmits the second body section portion. Http is an application layer protocol, and then TCP transport layer in some cases the process of connecting the two will appear, http protocol itself does not save state information, a request for a response. For TCP, the more the number of communications but lower reliability, finish required to transfer information in one link is the most reliable, so try to reduce network GET requests consuming. If the communication time is increased, this time the client at the server always connected, may increase the load on the server side, the reliability decreases.
2, GET request can be cache, GET request can be saved in the browser history inside the browser (important data such as passwords GET submission, others view the history, you can directly see these private data) POST not be cached.
3, GET URL parameter is a back belt, the maximum available length in the conventional IE URL is 2048 characters, are different for different browser URL length limitations on implementation. POST request no length limit (currently in theory).
4, the size of the data submitted by the GET, different restrictions in different browsers, generally between 2k-8k, POST to submit data is relatively large, the size limit value set by the server, and only some of the data with the POST method [carry] such as file.
5, all the POST is not very reasonable, preferably first request by the sub-function and the scene class of frequently requested data, the data is not sensitive, and the amount of data within the ordinary browser 2k range defined by a minimum, this use GET. Elsewhere use POST.
6. GET nature is [too], and the nature of POST is [to]. Moreover, GET is idempotent [], and at this point, GET is considered to be [safe]. Indeed server end can also be used as a resource update, but this usage in violation of the agreement, likely to cause CSRF (cross-site request forgery).

Guess you like

Origin www.cnblogs.com/elian91/p/11073682.html