Forum Moderators: open
We had a related discussion last fall. See this post:
[webmasterworld.com...]
Nothing 100% definitive there, but perhaps some ideas to get you thinking. At any rate, if you are using POST, then IE itself should not be imposing limits on the amount of data in a textarea.
To solve this one means we can set up new programs that have had to be abandoned. Basically it means no submit forms can be used on our site! I'm just trying to solve this right now using Javascript and cookies, but if anyone can help shed some light on this problem, do let me know!
Here is an example of what is actually sent to the server when a form is submitted with the GET method. There are two form fields with names "a" and "b":
GET /Test.asp?a=12&b=yes+I+am HTTP/1.1
Host: www.example.com
Connection: close
When a form is submitted with a POST method, the form data is sent as the message/body entity after the headers.
Here is an example of the same form data being submitted with the POST method:
POST /Test.asp HTTP/1.1
Host: www.example.com
Content-Length: 15
Content-Type: application/x-www-form-urlencoded
Connection: close
a=12&b=yes+I+am
I have seen others write that there is a size limit to a query string. I couldn't find that in the HTTP 1.1 RFC (RFC 2616), but it does elude to it by stating that a server status code of 414 might be returned by a server if the URI is longer than the server wants to process.
Anyway, I expect that your data is indeed being sent via GET instead of POST and that the IIS server is truncating the query string portion of the request line in an attempt to prevent buffer overflow attacks.
Using POST it was even worse. The maximum characters (in IE6) was between 235 and 332, depending on things like the cache. Any more and it would just stick, the loading bar continuously moving along the bottom of the browser window.
Other browsers had no problems, whether GET or POST was used (though GET still has the limit of 1,708 characters, at least on my system.)
So what I did was make a form that stored the text from a textarea into a cookie, using JavaScript. I figured I could then retrieve the text using PHP and process it from there. (I need to then save it onto the server, hence the need for PHP.) After much trial and error, it worked!
But here's what I found. My form was using POST and worked fine offline. But when I uploaded it, the form would give me an error: "The page cannot be found". Huh?! Then I realised it was not a 404 error but a 405! That is, a "Resource not allowed" error. Digging into the Microsoft IIS online error help pages, I learnt that the method used to access my second page was not allowed - so it had to be the form. So I changed it from POST to GET and it worked fine!
It suggests there is an error with the IIS server which other browsers ignore, but causes POST not to work with IE6. Is this possible?
Now here's the crunch. Remember I said there was a 1,708 character limit with GET? Not any more! By storing the text in a cookie, I now have a text limit of around 4000 characters! This is because a cookie can store up to 4Kb of data. (Though that also includes the name and date.) Magic!
The POST method can be disabled for the entire server, a single website, or just a folder. (maybe even for a single file) This is normally done via the IIS Control Panel. POST can also be disabled via the URLScan utility. The settings for this are in a .ini file.