Commit Graph
189 Commits
Author SHA1 Message Date
Marek Habersack 1b87ef0104 2007-05-15 Marek Habersack <[email protected]>
* HttpWebRequest.cs: fold all methods into GET for
	redirect/moves. Fixes bug #81624


svn path=/trunk/mcs/; revision=77392
2007-05-15 06:48:11 +00:00
Gonzalo Paniagua Javier 0ab0920a39 2007-03-05 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: properly handle OPTIONS, which may or may not
	have a request body. Fixes bug #80686.


svn path=/trunk/mcs/; revision=73777
2007-03-06 02:35:10 +00:00
Gert Driesen 464075aff1 * HttpWebRequest.cs: Allow Proxy to be set to null on 2.0 profile.
* HttpWebRequestTest.cs: Added test for bug #80944.

svn path=/trunk/mcs/; revision=73389
2007-02-24 10:02:33 +00:00
Miguel de Icaza 3a507fbe53 2007-01-22 Miguel de Icaza <[email protected]>
* HttpWebRequest.cs: Remove unused variable.

	* FtpWebRequest.cs: Remove unused variable.

svn path=/trunk/mcs/; revision=71484
2007-01-22 22:21:37 +00:00
Gonzalo Paniagua Javier 39ce8024a4 2006-12-23 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* HttpWebRequest.cs:
	* WebConnectionStream.cs: detect errors writing headers earlier and
	avoid race that showed up with SSL. Fixes bug #80234.


svn path=/trunk/mcs/; revision=69986
2006-12-23 08:23:50 +00:00
Gonzalo Paniagua Javier e70af48a3c 2006-11-21 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: add 2 more methods that are not supposed to have
	a body. Fixes bug #80001.


svn path=/trunk/mcs/; revision=68297
2006-11-21 22:43:53 +00:00
Gonzalo Paniagua Javier a42391d3c6 2006-10-04 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: internally allow buffer if it's not a known
	GET-only method instead of enabling that only for POST/PUT. Fixes bug
	#79595.


svn path=/trunk/mcs/; revision=66272
2006-10-04 21:37:34 +00:00
Gonzalo Paniagua Javier 64fcf30fe3 2006-04-27 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: reset the challenge and the status code when
	creating the tunnel and sending the proxy auth. headers. Improve error
	message when there's an error creating the tunnel.
	* HttpWebRequest.cs: don't trigger an early throw for a POST that gets
	a 401 or 407 response.


svn path=/trunk/mcs/; revision=60022
2006-04-28 00:48:41 +00:00
Gonzalo Paniagua Javier 2b452afac5 2006-04-26 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionData.cs:
	* WebConnection.cs:
	* HttpWebRequest.cs: when tunneling an ssl conneciton through a proxy,
	we were not handling a proxy authentication request. Fixes bug #78150
	take 2.


svn path=/trunk/mcs/; revision=59952
2006-04-26 21:16:16 +00:00
Gonzalo Paniagua Javier a9850902ba 2006-03-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: send the request if ContentLength is set for
	POST/PUT, the request stream has that exact amount of bytes in it and
	we're trying to get the response stream.

	This way, closing the request stream is not needed in order to actually
	send the request. Fixes bug #77753.

	* WebConnectionStream.cs: throw if the number of bytes written is
	greater than the specified request content length.


svn path=/trunk/mcs/; revision=57920
2006-03-13 22:57:58 +00:00
Gonzalo Paniagua Javier b509cdc267 2006-02-07 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't send the expect-100 if if there's no content.

	* HttpListenerRequest.cs:
	* HttpConnection.cs:
	* RequestStream.cs: use the content length header to avoid reading past
	the end of the stream.

	Patch by Horst Reiterer.


svn path=/trunk/mcs/; revision=56658
2006-02-08 01:33:15 +00:00
Gonzalo Paniagua Javier 67eb50c8bb 2006-02-02 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: dummy implementation of UnsafeAuthenticationBlah
	property.


svn path=/trunk/mcs/; revision=56500
2006-02-02 23:24:17 +00:00
Gonzalo Paniagua Javier 835abe7513 2005-11-17 Gonzalo Paniagua Javier <[email protected]>
* HttpListenerPrefixCollection.cs:
	* HttpWebResponse.cs:
	* Dns.cs:
	* HttpListenerRequest.cs:
	* HttpWebRequest.cs:
	* HttpListenerResponse.cs: a few signature fixes for 2.0.


svn path=/trunk/mcs/; revision=53210
2005-11-17 22:07:17 +00:00
Gonzalo Paniagua Javier 6cfab4a2db 2005-08-27 Gonzalo Paniagua Javier <[email protected]>
* GlobalProxySelection.cs: remove double lock.
	* HttpWebRequest.cs: remove double lock in GetServicePoint() and use
	a private object when locking.


svn path=/trunk/mcs/; revision=48980
2005-08-27 17:29:25 +00:00
Gonzalo Paniagua Javier 9fcfa9750d 2005-06-22 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: MS implementation follows redirects for POST. Seems
	to me that this is against 10.3.3 in RFC 2616, but may be the user
	'authorization' to do this is implicit in AllowAutoRedirect...


svn path=/trunk/mcs/; revision=46345
2005-06-22 06:04:24 +00:00
Gonzalo Paniagua Javier 16d1a69c18 2005-06-10 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* HttpWebRequest.cs:
	* WebConnectionStream.cs: initiate the polling for input data after
	sending the header so that we detect any response that the server sends
	back even if we're still trying to write the request for a POST/PUT.
	If we get the response (or an error) before any one calls GetResponse(),
	keep it around instead of ignoring it.


svn path=/trunk/mcs/; revision=45785
2005-06-10 17:53:44 +00:00
Gonzalo Paniagua Javier 161fa065b3 2005-06-03 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: send the right header/user/password in
	PreAuthenticate in presence of a proxy.


svn path=/trunk/mcs/; revision=45390
2005-06-03 22:15:41 +00:00
Gonzalo Paniagua Javier 146b74cd24 2005-04-11 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: ensure we read everything before redirecting.


svn path=/trunk/mcs/; revision=42783
2005-04-11 12:40:44 +00:00
Gonzalo Paniagua Javier e1bb860498 2005-04-10 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* HttpWebRequest.cs: now Abort() works properly. Fixes bug #74177.


svn path=/trunk/mcs/; revision=42770
2005-04-10 23:17:26 +00:00
Gonzalo Paniagua Javier e873f48a63 2005-04-10 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: 
	* WebConnectionStream.cs: implemented support for ReadWriteTimeout.


svn path=/trunk/mcs/; revision=42751
2005-04-10 06:00:03 +00:00
Gonzalo Paniagua Javier d7a10f260c 2005-04-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: throw the exception if we got an error, as now
	it's catched in the redirection handling code.


svn path=/trunk/mcs/; revision=42743
2005-04-09 20:03:35 +00:00
Gonzalo Paniagua Javier 3ceba47704 2005-04-08 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: moved redirection handling to a proper place.


svn path=/trunk/mcs/; revision=42706
2005-04-08 20:56:04 +00:00
Gonzalo Paniagua Javier b5ce71c485 2005-03-30 Gonzalo Paniagua Javier <[email protected]>
* CookieContainer.cs: adding to a CookieCollection might not increment
	the number of items if the cookie is replaced. Now Count works properly.
	Fixed an array index exception (typo).

	* CookieCollection.cs: also compare the version.

	* HttpWebResponse.cs: when we have cookies, add them to the request
	container.

	* HttpWebRequest.cs: changed last parameter of HttpWebResponse ctor.


svn path=/trunk/mcs/; revision=42411
2005-03-31 02:32:49 +00:00
Gonzalo Paniagua Javier 4f2bab519c 2005-03-10 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: moved cookie parsing into its own class.
	* WebHeaderCollection.cs: remove (probably bogus) GetMultipleValues
	call.
	* HttpWebRequest.cs: don't let exception raised in the ctor of
	HttpWebResponse vanish.

	Fixes bug #73275.


svn path=/trunk/mcs/; revision=41670
2005-03-10 23:29:30 +00:00
Gonzalo Paniagua Javier 5a767ce9e3 2005-02-12 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs:
	* WebConnection.cs:
	* HttpWebRequest.cs:
	* WebConnectionStream.cs: don't read the entire response unless the
	user requests it. Fixes bug #72443.


svn path=/trunk/mcs/; revision=40559
2005-02-12 21:54:47 +00:00
Gonzalo Paniagua Javier 2ded62faa5 2005-02-04 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: send the headers when we're supposed to write
	a POST/PUT but call GetResponse before GetRequestStream.

	* WebConnectionStream.cs: new RequestWritten property.


svn path=/trunk/mcs/; revision=40127
2005-02-04 12:41:33 +00:00
Gonzalo Paniagua Javier b994f7a27d 2004-12-14 Gonzalo Paniagua Javier <[email protected]>
* AuthenticationManager.cs: don't lock on a public Type.
	* HttpWebRequest.cs: read the error response for auth. errors.


svn path=/trunk/mcs/; revision=37732
2004-12-14 09:55:06 +00:00
Gonzalo Paniagua Javier 27cf273757 2004-12-12 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: set webResponse back to null when redirecting.
	Fix the previous patch so that it reads the whole response even if
	auto-redirect is not enabled. Closes bug #70484.


svn path=/trunk/mcs/; revision=37670
2004-12-12 22:59:11 +00:00
Gonzalo Paniagua Javier 6a0c4b7736 2004-12-12 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: added ReadAll method.

	* WebConnection.cs: in HandleError, set the response error after
	closing the socket. Use an async. delegate to finish reading any prior
	WebConnectionStream.

	* HttpWebRequest.cs: for error responses that allow content, read the
	stream immediately. Fixes bug #70483.


svn path=/trunk/mcs/; revision=37664
2004-12-12 20:43:09 +00:00
Gonzalo Paniagua Javier 7a23a83534 2004-12-04 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-12-04 11:52:31 +00:00
Gonzalo Paniagua Javier 44286bd650 2004-10-27 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't fail if the request has already been sent
	when accessing ContentType setter. Fixes bug #68848.

svn path=/trunk/mcs/; revision=35366
2004-10-27 20:07:06 +00:00
Gonzalo Paniagua Javier 7f0c264c40 2004-10-25 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-10-25 21:26:55 +00:00
David Sheldon 23438d745c 2004-10-10 David Sheldon <[email protected]>
* HttpWebRequest.cs: Use RemoveAndAdd for AddRange. Fixes unittest.

svn path=/trunk/mcs/; revision=34848
2004-10-10 21:24:04 +00:00
Gonzalo Paniagua Javier 3ca52666c9 2004-10-05 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: use RemoveAndAdd for headers multivalue headers.
	* WebHeaderCollection.cs: added RemoveAndAdd that behaves like the old
	SetInternal.

svn path=/trunk/mcs/; revision=34698
2004-10-05 01:53:40 +00:00
Gonzalo Paniagua Javier 7b5d49ae29 2004-10-04 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: ProxyQuery returns true when we use a proxy without
	tunneling a secure connection.

	* ServicePoint.cs: added UseConnect property.

	* ServicePointManager.cs: set the UseConnect property when we use a http
	proxy for a https connection.

	* WebConnection.cs: setup the tunnled connection when using a proxy and
	https.

svn path=/trunk/mcs/; revision=34682
2004-10-04 20:25:38 +00:00
Gonzalo Paniagua Javier 3a58628a3b 2004-07-16 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: detect changes in scheme or port when redirecting.
	Fixes las take on bug 61218.

svn path=/trunk/mcs/; revision=31207
2004-07-16 04:48:18 +00:00
Gonzalo Paniagua Javier 2f46599cce 2004-07-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: removed bogus Monitor.Exit.
	* WebConnection.cs: use Address instead of RequestUri when checking for
	the scheme in order to select the stream type. Fixes bug #61218.

svn path=/trunk/mcs/; revision=30900
2004-07-08 23:08:44 +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 ec49116c9e 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* System.Net/HttpWebRequest.cs: added 3 missing properties for 1.1. They
	are not used yet.

	* System.Net/NetConfig.cs: added MaxResponseHeadersLength field.

	* System.Net/ServicePoint.cs:
	* System.Net/ServicePointManager.cs: added missing properties for 1.1.

	* System.Net.Configuration/NetConfigurationHandler.cs: process the
	httpWebRequest node too. Better error checking.

svn path=/trunk/mcs/; revision=27211
2004-05-13 02:26:55 +00:00
Lluis Sanchez 5b6c491d20 * HttpWebRequest.cs: Use a lock block instead of Monitor.Enter/Exit, so
the lock is released in case of exception (for example, a
	ThreadAbortException). This also "fixes" bug #52417.
	Beware, this requires a runtime update (due to a bug in Monitor.Exit).
	* ServicePoint.cs: Changed method from internal to private, since it is not
	called from outside the class.

svn path=/trunk/mcs/; revision=24704
2004-03-29 12:17:03 +00:00
Gonzalo Paniagua Javier b24f2374e0 2004-03-24 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: added the exception status to the error message.
	* WebConnection.cs: add headers using SetInternal instead of Add to
	bypass header name validation. Fixes bug #55994.
	* WebHeaderCollection.cs: added SetInternal (string header).

svn path=/trunk/mcs/; revision=24549
2004-03-24 22:06:56 +00:00
Gonzalo Paniagua Javier 03131505b1 2004-02-25 Gonzalo Paniagua Javier <[email protected]>
* DigestClient.cs: removed Console.
	* HttpWebRequest.cs: 401/407 were hanging for GET. Fixed.

svn path=/trunk/mcs/; revision=23431
2004-02-25 09:44:23 +00:00
Gonzalo Paniagua Javier 17b507ebdf 2004-02-20 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: arghhh. I used the server response headers instead
	of what the client is supposed to send. Thanks to Helge Hess.

svn path=/trunk/mcs/; revision=23275
2004-02-20 05:26:01 +00:00
Gonzalo Paniagua Javier 3d9b156cbf 2004-02-19 Gonzalo Paniagua Javier <[email protected]>
* AuthenticationManager.cs: implemented PreAuthenticate().

	* HttpWebRequest.cs: once we know the version of the server, use it if
	below the requested one. Remove 'Expect', 'Content-Length' and /or
	'Transfer-Encoding' if appropiate due to changes in version. Fixed
	'Host' header for non-standard ports. Support preauthentication. Closes
	bug #50530.

svn path=/trunk/mcs/; revision=23260
2004-02-19 18:44:08 +00:00
Gonzalo Paniagua Javier f91515a25e 2004-02-19 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: check for missing or wrong URI in Location header
	when redirecting.

	* WebConnection.cs: if the data read does not contain all the headers,
	keep it around and read the rest until we get to the response body.
	Allow response code with no description. Fixed bug #54543.

svn path=/trunk/mcs/; revision=23244
2004-02-19 03:05:19 +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 5a151643b6 Thanks Lluis for noticing this.
svn path=/trunk/mcs/; revision=23162
2004-02-17 09:18:05 +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
Lluis Sanchez cbf03321ee * HttpWebRequest.cs: When retrying a POST request after an authentication
failure, resend the body. This fixes bug #51841.
	* WebConnectionStream.cs: Added properties for getting what's been written.

svn path=/trunk/mcs/; revision=23121
2004-02-16 10:18:23 +00:00
Gonzalo Paniagua Javier a0ec7a5cf7 2004-02-12 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't send 'Expect: 100-continue' for 1.0 version.

svn path=/trunk/mcs/; revision=23033
2004-02-12 17:58:44 +00:00