Request.Form for a textarea returns bad data

asp-classicfirefoxformsiisvbscript

This is a very weird error ocurring only with Firefox 3.5. I have tested it for IE, Safari and Chrome revealing no errors.

I'm using my localhost IIS 5.1 and ye old asp.

I've been able to reduce the scope to this… I have a textarea in a form, filled with 4000 characters, for example.

< textarea name="obs" id="obs" cols="75" rows="10">…< /textarea >

I submit it to page.asp.

In this example page I just make:

    response.Write Request.Form( "obs" )
    response.End

80% of times, firefox fails to end loading (waiting for localhost…) and I see that the string "Server:Microsoft-IIS/5.1Date:Tue,01Sep200915:55:01GMTContent-Type:text/html;charset=iso-8859-1" has been inserted in a random place inside text. In addition, the end of the text is cropped (I suppose that's what firefox is waiting for…).

When firefox loads normally the server string is not included.

Of course I cannot write this data to the database… ;-D

Thanx for reading and I will appreciate any idea about it.

EDIT: I have restarted my PC and disabled all firefox plugins and extensions and the error keeps "working" 🙁

Best Answer

Its a bit strange. I've done some testing and I'm not getting the same problem.

At a guess you have response buffering set to false in ASP but FF is not comprehending the resulting chunked encoding. Why your copy of FF isn't coping I don't know since it works fine on my 3.5 version with or without chunked encoding.

Can you improve the quality the reproduction details in your question. I'm using the this ASP page as a test:-

<%
If Request.QueryString("function") = "post" Then
    Response.Buffer = False
    Response.Write Request.Form("obs")
    Response.End
End If 
%>
<html>
<head>
</head>
<body>
<form action="test.asp?function=post" method="post">
    <textarea name="obs" id="obs" cols="75" rows="10">
              <!-- Loads of text here -->
    </textarea >
    <input type="submit" value="go" />
</form>
</body>
</html>