Commit Graph
106 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 4771a3f360 2009-02-08 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: lock SetResponseError.


svn path=/trunk/mcs/; revision=126292
2009-02-08 23:11:03 +00:00
Gonzalo Paniagua Javier 42bcc2f506 2009-02-03 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* HttpWebRequest.cs: calling Abort is safe now if the request has been
	read entirely.


svn path=/trunk/mcs/; revision=125633
2009-02-04 01:50:09 +00:00
Gonzalo Paniagua Javier 0a087b4e24 2009-01-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: added locking in SetResponseData for the case
	when we get an error response before BeginGetResponse has been
	called.


svn path=/trunk/mcs/; revision=124452
2009-01-26 05:02:47 +00:00
Marek Habersack 5e95e86db1 2009-01-19 Marek Habersack <[email protected]>
* HttpWebRequest.cs: implemented the UseDefaultCredentials
	property, patch from Florian Maetschke <[email protected]>,
	thanks!

svn path=/trunk/mcs/; revision=123792
2009-01-19 13:22:39 +00:00
Gonzalo Paniagua Javier c95dfe4d99 2009-01-14 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: create a result from the response when
	*GetResponse() has not been called yet and we have already received
	all the data.
	Fixes bug #464013.


svn path=/trunk/mcs/; revision=123313
2009-01-14 05:47:13 +00:00
Gonzalo Paniagua Javier 4f7efa726b 2009-01-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: keepAlive is of no use here.
	Fixes bug #465613.


svn path=/trunk/mcs/; revision=123252
2009-01-13 20:51:11 +00:00
Gonzalo Paniagua Javier 07c165832b 2008-10-23 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't call ProxyRequest twice.
	* WebConnectionData.cs: remove unused fields.

	* WebConnection.cs:
	* WebConnectionStream.cs: when setting the input buffer, check to see
	if the entire response is already there and free up the request slot.
	Fixes bug #423156.

	* ResponseStream.cs:
	* HttpListenerResponse.cs: buffer the headers so that they are sent
	together with the data on the first Write (if any). The fix above
	didn't work with our HttpListener without this.


svn path=/trunk/mcs/; revision=116868
2008-10-23 19:11:33 +00:00
Gonzalo Paniagua Javier 61bbe5b41b 2008-10-08 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* ServicePoint.cs:
	* WebConnectionGroup.cs:
	* HttpWebRequest.cs:
	* WebConnectionStream.cs: reuse the same connection when doing NTLM
	authentication. Fixes bug #323375.
	Implemented support for UnsafeAuthenticatedConnectionSharing.


svn path=/trunk/mcs/; revision=115265
2008-10-08 20:16:33 +00:00
Gonzalo Paniagua Javier c058b49aef 2008-10-08 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: if GetRequestStream has already been called,
	return the same stream that we returned in the first call.
	Fixes bug #429200.


svn path=/trunk/mcs/; revision=115225
2008-10-08 15:25:53 +00:00
Miguel de Icaza 5e52009db7 Apply patch from Atsushi Enomoto to fix #397627
svn path=/trunk/mcs/; revision=111562
2008-08-25 19:45:39 +00:00
Marek Habersack a422125966 2008-04-16 Marek Habersack <[email protected]>
* HttpWebRequest.cs: fix an off-by-one bug - the number of
	redirects must not exceed the value of
	MaximumAutomaticRedirections. Fixes bug #380131

svn path=/trunk/mcs/; revision=100780
2008-04-15 23:35:35 +00:00
Daniel Nauck 71883e528e 2008-01-26 Daniel Nauck <[email protected]>
* HttpWebRequest.cs: fixed typo. Use the actual uri for correct
	cookie header informations and not the originally one.


svn path=/trunk/mcs/; revision=94023
2008-01-26 21:14:20 +00:00
Marek Habersack fb23c6fb46 2007-11-16 Marek Habersack <[email protected]>
* HttpWebRequest.cs: when folding a request into a GET one, set
	content length to 0 and kill the buffers. Fixes bug #327314. Patch
	from Geoff Norton <[email protected]>, thanks!

svn path=/trunk/mcs/; revision=89790
2007-11-16 20:31:22 +00:00
Marek Safar e61dde083e Warnings cleanup
svn path=/trunk/mcs/; revision=89678
2007-11-15 14:14:49 +00:00
Jb Evain 7d74c61c3a 2007-08-08 Jb Evain <[email protected]>
* HttpWebRequest.cs: .ctor(Uri) is public in 2.1.

svn path=/trunk/mcs/; revision=83635
2007-08-08 06:48:13 +00:00
Dick Porter 6b41703ee1 2007-06-21 Dick Porter <[email protected]>
* AuthenticationManager.cs: 
	* FtpWebRequest.cs: 
	* Cookie.cs: 
	* ServicePoint.cs: 
	* WebClient.cs: 
	* Authorization.cs: 
	* FileWebRequest.cs: 
	* HttpWebRequest.cs: 
	* WebResponse.cs: 
	* ServicePointManager.cs: 
	* HttpWebResponse.cs: Throw NotImplementedException indirectly, to
	reduce noise in Moma reports.



svn path=/trunk/mcs/; revision=80484
2007-06-21 15:24:34 +00:00
Dick Porter fa277dafe1 2007-06-19 Dick Porter <[email protected]>
* AuthenticationManager.cs: 
	* IWebProxyScript.cs: 
	* Authorization.cs: 
	* Cookie.cs: 
	* CookieException.cs: 
	* CredentialCache.cs: 
	* FileWebRequest.cs: 
	* WebRequest.cs: 
	* FileWebResponse.cs: 
	* WebResponse.cs: 
	* FtpWebRequest.cs: 
	* HttpWebRequest.cs: 
	* DecompressionMethods.cs: 
	* HttpWebResponse.cs: 
	* ProtocolViolationException.cs: 
	* ServicePoint.cs: 
	* ServicePointManager.cs: 
	* WebClient.cs: 
	* WebException.cs: 
	* WebHeaderCollection.cs: 
	* WebProxy.cs: 
	* WebExceptionStatus.cs: 2.0 profile updates



svn path=/trunk/mcs/; revision=80152
2007-06-19 13:23:16 +00:00
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