http://bugzilla.novell.com/show_bug.cgi?id=597556
http://bugzilla.novell.com/show_bug.cgi?id=597556#c0 Summary: HttpWebRequest doesn't ignore chunk-extension in chunked encoding Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: All OS/Version: All Status: NEW Severity: Minor Priority: P5 - None Component: System AssignedTo: mono-bugs@lists.ximian.com ReportedBy: br...@sooloos.com QAContact: mono-bugs@lists.ximian.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2 see http/1.1 docs here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 It is legal for an HTTP/1.1 server to send an optional chunk-extension after a chunk-size. The chunk decoder in the GetChunkSize method in ChunkStream.cs is clearly just reading the chunk header until it sees \r\n and trying to parse the result as a HexNumber directly. This fails if the chunk has a chunk-extension since the string being parsed would look like "1A0; foo\r\n" instead of the more common "1A0\r\n". The chunk decoder should instead read up to a semicolon OR \r\n, parse those characters as a hex number, then in the case where it read up to a semicolon, discard bytes until an \r\n is encountered. Reproducible: Always Steps to Reproduce: 1. set up a webrequest to a server that sends chunk-extension 2. call GetResponse() on it 3. call GetResponseStream() on the response 4. call Read(...) on the stream. Actual Results: mono http stack throws a protocol violation "Cannot parse chunk size." Expected Results: mono reads the data sent by the server, ignoring the chunk-extension -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs