* 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
* 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
* 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
* 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
* 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
* HttpWebRequest.cs: fixed typo. Use the actual uri for correct
cookie header informations and not the originally one.
svn path=/trunk/mcs/; revision=94023
* 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
* 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