Commit Graph
13 Commits
Author SHA1 Message Date
Martin Baulig e49d56e8d1 [Http]: Cleanup chained async operations; bug #19161. 2014-05-21 02:26:48 +02:00
Martin Baulig 0cf33093b7 Emit WebAsyncResult's callback on same thread on sync completion.
This fixes System.Net.Http.HttpClientTest.Send_Content_Put ().
2012-10-26 01:00:03 +02:00
Gonzalo Paniagua Javier 50a295ac1b Invoke the callback in separate threads
The callbacks need to be invoked in different threads to avoid clogging
	the IO pool.

	Fixes bug #639656.
2010-09-30 01:52:31 -04:00
Gonzalo Paniagua Javier 7584df6cf8 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* WebAsyncResult.cs: new field that tells us if the request is being
	written automatically because we reached the content length.
	* WebConnection.cs:
	* WebConnectionStream.cs: make sure we only access the NetworkStream
	while we own it. Automatically write the request when we reach
	ContentLength number of bytes. Kill the write buffer as soon as
	possible. Don't use the buffer at all when chunked encoding is
	enabled.

	Fixes bugs #515931 and #510642.

svn path=/trunk/mcs/; revision=136900
2009-06-25 23:23:24 +00:00
Gonzalo Paniagua Javier 1d9c9e2441 Fix warnings
svn path=/trunk/mcs/; revision=43368
2005-04-21 00:47:25 +00:00
Gonzalo Paniagua Javier 1be9ca7a33 2005-04-16 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: call SetComplete in EndWrite when we're not
	buffering the request body. Fixes bug #74673.

	* WebAsyncResult.cs: renamed field.


svn path=/trunk/mcs/; revision=43129
2005-04-16 21:41:05 +00:00
Gonzalo Paniagua Javier d43aab1f7b 2005-04-14 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs:
	* WebAsyncResult.cs: ensure we only call EndRead once per async. result.
	Update total before invoking the callback when present.


svn path=/trunk/mcs/; revision=43016
2005-04-14 22:40:16 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Gonzalo Paniagua Javier 95ed6c4c40 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* WebAsyncResult.cs: don't create the WaitHandle if not needed.

svn path=/trunk/mcs/; revision=27219
2004-05-13 03:37:35 +00:00
Gonzalo Paniagua Javier ed924f816b 2004-02-18 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: send the 'Connection: keep-alive' header when we
	don't know the server version or it's 1.0.

	* ServicePoint.cs: added SetVersion.

	* WebAsyncResult.cs: remove ChunkAsyncResult.

	* WebConnection.cs: set the ServicePoint version when getting a response
	from the server.

	* WebConnectionStream.cs: when posting chunked content, send the head,
	body and trailer of the chunk at once instead of doing 3 separate
	writes, which may cause troubles.

svn path=/trunk/mcs/; revision=23223
2004-02-18 17:14:37 +00:00
Gonzalo Paniagua Javier 7caef67a07 2004-02-17 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: on second and sucesive tries when authenticating,
	don't use chunked encoding for POST, as we know the content length and
	have the body. Nullify bodyBuffer always in CheckFinalStatus.

	* WebAsyncResult.cs: added ChunkAsyncResult property. It holds the
	IAsyncResult when writing CRLF at the end of a chunk.

	* WebConnectionStream.cs: support sending chunked data.

svn path=/trunk/mcs/; revision=23153
2004-02-17 01:36:39 +00:00
Gonzalo Paniagua Javier 7944c86a9e 2003-06-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: *really* take care of requestSent to prevent
	sending the same request twice.
	* WebAsyncResult.cs: don't close the handle. Just Reset.
	* WebConnectionStream.cs: removed unneeded line.

svn path=/trunk/mcs/; revision=15354
2003-06-12 22:27:09 +00:00
Gonzalo Paniagua Javier cc8432099d Reworked HttpWebRequest and related classes.
svn path=/trunk/mcs/; revision=15149
2003-06-06 06:57:36 +00:00