[Mono-bugs] [Bug 55994][Nor] New - Http Client fails with extra headers.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Mar 2004 11:25:45 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=55994
--- shadow/55994 2004-03-24 11:25:45.000000000 -0500
+++ shadow/55994.tmp.27106 2004-03-24 11:25:45.000000000 -0500
@@ -0,0 +1,77 @@
+Bug#: 55994
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Http Client fails with extra headers.
+
+I tried to download a web page, that has added an extra header:
+
+mono$ wget http://allenjs.gearhost.net/blog/SyndicationService.asmx/GetRss
+--11:17:27-- http://allenjs.gearhost.net/blog/SyndicationService.asmx/GetRss
+ => `GetRss'
+Resolving allenjs.gearhost.net... done.
+Connecting to allenjs.gearhost.net[69.24.75.32]:80... connected.
+HTTP request sent, awaiting response... 200 OK
+Length: 69,893 [text/xml]
+
+100%[=============================================================================================>]
+69,893 94.27K/s ETA 00:00
+
+11:17:28 (94.27 KB/s) - `GetRss' saved [69893/69893]
+
+
+With our code, it produces:
+
+Getting http://allenjs.gearhost.net/blog/SyndicationService.asmx/GetRss
+Exception from
+http://allenjs.gearhost.net/blog/SyndicationService.asmx/GetRss :
+System.Net.WebException: Error getting response stream --->
+System.ArgumentException: invalid header name: Hosted By
+Parameter name: headerName
+in [0x00020] (at
+/cvs/mcs/class/System/System.Net/WebHeaderCollection.cs:125)
+System.Net.WebHeaderCollection:AddWithoutValidate (string,string)
+in [0x00035] (at
+/cvs/mcs/class/System/System.Net/WebHeaderCollection.cs:119)
+System.Net.WebHeaderCollection:Add (string,string)
+in [0x00043] (at
+/cvs/mcs/class/System/System.Net/WebHeaderCollection.cs:110)
+System.Net.WebHeaderCollection:Add (string)
+in [0x00222] (at /cvs/mcs/class/System/System.Net/WebConnection.cs:356)
+System.Net.WebConnection:GetResponse (byte[],int)
+in [0x000b3] (at /cvs/mcs/class/System/System.Net/WebConnection.cs:210)
+System.Net.WebConnection:ReadDone (System.IAsyncResult)
+--- End of inner exception stack trace ---
+
+I did this:
+
+mono$ telnet allenjs.gearhost.net 80
+Trying 69.24.75.32...
+Connected to allenjs.gearhost.net.
+Escape character is '^]'.
+GET /blog/SyndicationService.asmx/GetRss
+
+HTTP/1.1 200 OK
+Date: Wed, 24 Mar 2004 16:18:31 GMT
+Server: Microsoft-IIS/6.0
+Hosted By: GearHost (www.gearhost.com)
+X-AspNet-Version: 1.1.4322
+Cache-Control: public, max-age=0
+Last-Modified: Wed, 24 Mar 2004 08:26:10 GMT
+ETag: 632156883707414889
+Content-Type: text/xml; charset=utf-8
+Content-Length: 69893
+
+Probably the space in the header is causing the problem .