* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* AuthenticationManager.cs: don't lock on a public Type.
* HttpWebRequest.cs: read the error response for auth. errors.
svn path=/trunk/mcs/; revision=37732
* 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
* 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
* 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
* 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
* 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
* HttpWebRequest.cs: use RemoveAndAdd for headers multivalue headers.
* WebHeaderCollection.cs: added RemoveAndAdd that behaves like the old
SetInternal.
svn path=/trunk/mcs/; revision=34698
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
failure, resend the body. This fixes bug #51841.
* WebConnectionStream.cs: Added properties for getting what's been written.
svn path=/trunk/mcs/; revision=23121