* WebConnection.cs: handle errors on chunked streams. Fixes bug #66858.
* ChunkStream.cs: added error checking all over.
* HttpWebRequest.cs: throw the exception received in SetResponseError
if we already have a response.
(SetRequestData): Don't nest the exception if it's a WebException.
svn path=/trunk/mcs/; revision=37075
* ChunkStream.cs: simplified condition for WantMore property.
* WebConnection.cs: in Connect(), finish any pending reads we might
have for chunked data. Ignore possible blank lines at the very
beginning of the server response. Honor user set KeepAlive in
HttpWebRequest for HTTP/1.1 connections. Thanks to Eyal Alayuf for
his suggestions and code.
svn path=/trunk/mcs/; revision=35934
* ChunkStream.cs:
(WantMore): we're not done until we get a 0 chunk size and the trailer.
The 0 can be expressed as more than one character too (ie, 000000).
* HttpWebRequest.cs: new argument in SetResponseError.
* WebConnection.cs: added argument to HandleError as a hint for
debugging.
(Connect): make the chunked stream be in the expected state when
reusing.
* WebConnectionStream.cs: removed unused method (ResetWriteBuffer).
svn path=/trunk/mcs/; revision=35312
* ChunkStream.cs: added ChunkLeft property.
* WebConnection.cs:
(EndRead): when using small byte arrays to read from a chunked stream,
ensure we've read the chunk size and try to fulfill the request
completely. fixes bug 59653.
svn path=/trunk/mcs/; revision=28915
* ChunkStream.cs: use an array of buffers instead of a MemoryStream for
storing the chunks. This way, we won't miss traling data from the
previous chunk when a new one is received before the other is fully
read.
svn path=/trunk/mcs/; revision=23004
* ChunkStream.cs:
* WebConnection.cs: fixed bug that caused ChunkStream to return 0 on
Read if it have not yet received any byte of the body but is expecting
a body.
svn path=/trunk/mcs/; revision=22944
to write, but the last offset to be written. Thus, in WriteAndReadBack,
since "read" is not an offset but the number of bytes, it must be added to
the offset. Maybe it would be a good idea to change the name of the
parameter, since it is confusing. This should fix bug #52591.
svn path=/trunk/mcs/; revision=22161
* ChunkStream.cs:
(WantMore): true if we've not received the last chunk yet. Fixes
bug #45463. Thanks to Miguel for tracking this down and providing a
test case.
* WebConnection.cs: removed bogus ^M's.
* WebHeaderCollection.cs: provide more info when the header or value is
wrong.
svn path=/trunk/mcs/; revision=16441