[Mono-dev] ASP.Net HttpResponse.SuppressContent
Arnhoffer Károly
karnhoffer at ecron.hu
Thu Jan 26 04:04:09 EST 2006
+---------------BEGIN output xsp/mono/linux ------------------ POST
+/index.aspx HTTP/1.1
+
+Host: 127.0.0.1:8080
+
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12)
+Gecko/20050920 Firefox/1.0.7 SUSE/1.0.7-0.1
+
+Accept:
+text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla
+in;q=0.8,image/png,*/*;q=0.5
+
+Accept-Language: en-us,en;q=0.5
+
+Accept-Encoding: gzip,deflate
+
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+
+Keep-Alive: 300
+
+Connection: keep-alive
+
+Referer: http://127.0.0.1:8080/index.aspx
+
+Cookie: ASPSESSION=C08469137C85BDA1013610C6951CB3
+
+Content-Type: application/x-www-form-urlencoded
+
+Content-Length: 51
+
+
+
+__EVENTTARGET=Button1&__EVENTARGUMENT=&__VIEWSTATE=HTTP/1.0 200 OK
+
+Server: Mono.WebServer/0.1.0.0 Unix
+
+Date: Tue, 24 Jan 2006 18:38:25 GMT
+
+Content-Length: 1061
+
+Cache-Control: private
+
+Content-Type: text/html; charset=utf-8
+
+Keep-Alive: timeout=15, max=97
+
+Connection: Keep-Alive
+---------------END output xsp/mono/linux ------------------
Comparing this with my results:
POST /c/WebForm1.aspx HTTP/1.1\r\n
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*\r\n
Referer: http://192.168.1.200/c/WebForm1.aspx\r\n
Accept-Language: hu\r\n
Content-Type: application/x-www-form-urlencoded\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)\r\n
Host: 192.168.1.200\r\n
Content-Length: 51\r\n
Connection: Keep-Alive\r\n
Cache-Control: no-cache\r\n
Cookie: ASPSESSION=5AF35BFB0FDA6F461DD15A3645864C\r\n
\r\n
HTTP/1.1 200 OK\r\n
Date: Wed, 25 Jan 2006 08:01:08 GMT\r\n
Server: Apache/2.0.50 (Linux/SUSE)\r\n
Content-Length: 0\r\n
Cache-Control: private\r\n
Keep-Alive: timeout=15, max=99\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=iso-8859-2\r\n
\r\n
It seems that something is bad at my side. Your Content-Length is as it is to be. But mine is allways 0. Hm... When I do this:
private void Button1_ServerClick(object sender, System.EventArgs e)
{
Response.AddHeader("Content-Length", "1000");
Response.SuppressContent = true;
}
Content-Length is still 0. Now it seems to me that it does not matter what content length I set programmatically Apache recalculates it or something like that.
There is an other mysterious thing, when I do the following:
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
Response.AddHeader("Content-Length", "1000");
}
On IIS/.Net it is right (only a 1000 length response) but on Apache/Mono it gives me the following error in Apache's error_log:
** ERROR **: Invalid IL code at IL0000 in MonoCharsetTest.WebForm1: OnInit (System.EventArgs): IL_0000: callvirt 0x0a000010
aborting...
Now I am goning to examine this Apache.
(K)
-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Gonzalo Paniagua Javier
Sent: Wednesday, January 25, 2006 5:22 PM
To: mono-devel-list at lists.ximian.com
Subject: RE: [Mono-dev] ASP.Net HttpResponse.SuppressContent
> Now the question is what does this Content-Length stuff? IIS or .Net?
The answer for this one is easy: use xsp on windows to figure it out :-).
XSP not sending the correct content-length is probably a bug on our side. Imagine this was a 'HEAD' request...
-Gonzalo
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list