Analysis of two length limitations
(From the project)
First, the cause cause
There are: "Post-release issues" after the release of Bug statistics after a project release:
problem
the reason
analysis
Note
When the CSV is processed, if the number of topics in the process is too large, an error occurs in the upper limit of the URL parameter;
Variable length parameters are passed through the URL, which causes this potential error.
1. It belongs to 2 problems. There is no timely manner to communicate related precautions to the team through Checklist or the like; 2. There is no test of mass data when testing;
1. As an experience added to checklist, enhance the effect of sharing, inspection within the group;
When the original GUI condition is confirmed, when the CSV output is performed, the content of the CSV file cannot be output. There is no size limit for the POST data existence of 128K.
This is a new issue, and I have never met, and I have not conducted a large-scale data quantity test.
Sucklist has been listed in Checklist
As an empirical accumulation, these issues, reasons and solutions will be included in Checklist, then:
The first question: Does the URL parameter upper limit are accurate? What is the upper limit?
Second question: Why is POST data limited? Is the limit 128K?
Second, the problem analysis
1, first:
1) The URL does not have the upper limit of the parameter. This problem is actually a problem that IE has a length limit on URL.
2) The HTTP protocol specification does not limit the length of the URL. This limitation is a specific browser and server restrictions on it. The limit of the length of the URL is 2083 bytes (2k 35). For other browsers, such as Netscape, Firefox, etc., theoretically there is no length limit, which depends on the support of the operating system. [Participation 1]
3) "Parameters of variable length pass through the URL mode" actually use the GET method when submitting the form, not the POST method. This potential error is to submit form data using the GET method. Because the GET method is passed to the server in the URL.
4) Pay attention to this limit is the length of the entire URL, not just your parameter value data length.
5) Since it is the limit of IE to the length of the URL, this limit is there regardless of the GET method or the post method.
(For details on form and post methods for Form, please refer to relevant information [Part 2])
Suggest:
1) Understand the environment in which applications, such as web applications, server environments, understand their specific parameter restrictions.
2) Submit complex data to use the POST method. Note that the form is used by default when the form does not write a Method property.
Conclusion (write Checklist):
When submitting data using the GET method, in the IE environment, it is necessary to consider the limit of the URL length 2083 bytes.
2, second:
1) In theory, POST is not limited. The HTTP protocol specification has not been limited.
2) "The amount of POST data is 128K" is not accurate enough, and the POST data is unlimited, and the limitation is the processing capability of the server's handler.
3) For the ASP program, the REQUEST object handles 100K data length limitations when each form field is processed. But there is no restriction if it is useless.binaryRead. For a solution that needs to process more than 100K table single domain data, please refer to [Part 3] later.
4) From this extension, for IIS 6.0, Microsoft has increased restrictions [Part 4] for security considerations. We also need to pay attention:
IIS 6.0 default ASP POSP POST data is up to 200KB, each format limit is 100KB. IIS 6.0 The maximum size of the default upload file is 4MB.
IIS 6.0 default maximum request head is 16KB.
There is no such limit before IIS 6.0.
Suggest:
1) Clear clear the default setpoint for the operating environment helps your design and the problem of problems.
2) The server version should be considered. Each version of IIS is different from the default settings of these parameters. If necessary, find the information to organize a comparison table. This has a reference when developing and testing.
3) These limits of IIS 6.0 are actually just its default settings, and the actual application environment You can modify them. Default definition in Winnt / System32 / InetSrv / Metabase.xml: AspBufferingLimit = "4194304" corresponds to the maximum size of the upload file aspmaxrequestentityAllowed = "204800" corresponding to POST maximum data volume ... Conclusion (write checklist): When using ASP It is necessary to consider that the POST form is limited to 100KB of each domain. Do not consider whether to use Request.Binary. References: 1, Maximum URL Length Is 2,083 Characters in Internet Explorer 2, Hypertext Transfer Protocol - HTTP / 1.1 3, PRB: Error "Request Object, ASP 0107 (0x80004005)" When You Post a Form 4, IIS 6.0 Troubleshooting [ Client Requests Error-Out Or Time-Out section]