Data (ASP) with POST is submitted in the FORM domain (ASP)

xiaoxiao2021-03-06  106

There is a problem that when the amount of data sent by the form is large, it will be reported. Checking MSDN learned because Microsoft limits the maximum data received by Request.form () to 128K bytes.

Microsoft recommends reading form data with request.binaryRead (), but since this method reads binary data, it is necessary to analyze the read data by-byte, generate meaningful strings (one program on MSDN is Written this, but it does not consider special analysis, such as the escape character, such as punctuation, etc.). If this method is barely available for the pure English system, there is a great trouble for the Chinese system, because the Chinese characters are represented by two bytes, and the binary data read by the binary data cannot be judged to be English or Chinese characters (otherwise it is not binary data, but the string ^ - ^). In this way, you must understand the code law of Chinese characters to analyze. Finally, even if the algorithm can be analyzed, everyone thinks about the analysis of a MB-level giant string on-byte, how is the efficiency? So, this road is not available!

However, the way is always there. At first I thought it was the sum of the entire form data, and later found that this is the limit on each domain in the form. The problem is that for a domain that needs to send big data, the data is split to a number of pieces smaller than the limit before submitting the form, separately in several hidden domains, and simultaneously clear the original domain, and then formally submit form. . The server is still used to read the data of each hidden domain with request.form (), and then put them up in order. The main code is as follows:

Note: You need to specify a DIV within the HTML code in the Form to dynamically insert the Hidden domain. ==== Client sample code ====