* 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
* WebConnectionStream.cs (WriteRequest): For small requests,
cluster together the header + body in a single write call, avoids
the latency problems observed in an TLS application that makes
many web service calls.
2008-08-22 Geoff Norton <[email protected]>
* WebConnection.cs: Set NoDelay
svn path=/trunk/mcs/; revision=111430
* WebConnection.cs: Patch to remove the hack that was required for
using the older versions of the SSL/TLS classes. This hack is no more
required :-). Patch by Gonzalo Paniagua Javier.
svn path=/trunk/mcs/; revision=65260
* 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
* WebConnection.cs: if cnc.EndRead throws, mark the asyncresult as done.
* WebConnectionStream.cs: if we're done with the body of a chunk, don't
require the next chunk header to be there, as some servers might close
the connection (while also sending 'Connection: close').
svn path=/trunk/mcs/; revision=46512
* WebConnection.cs: SslClientStream.BeginRead might not be asynchronous
if there's no record available to read. This is a workaround that makes
the call to BeginRead itself asynchronous. Fixes bug #75342.
svn path=/trunk/mcs/; revision=46332
* 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
* System.Net/WebConnection.cs: prevent 2 nullrefs when the aborting
during Connect() and reset the status to Success before starting a
new request.
* System.Net.Sockets/Socket.cs: apply the same hack on blocking Connect
calls as the one used in Accept.
Fixes bug #75025.
svn path=/trunk/mcs/; revision=44919
* WebConnection.cs: don't rethrow errors in Write, as the error will be
received by GetResponse*. The result is that the threadpool thread doing
this will not end up printing the exception. Fixes bug #74817.
svn path=/trunk/mcs/; revision=44008
* WebConnection.cs: removed a 'slightly' important line by mistake.
* WebConnectionStream.cs: if the transfer encoding is chunked, ignore
content-length header if present.
svn path=/trunk/mcs/; revision=43952
* WebConnection.cs: no need to use an AutoResetEvent.
* WebConnectionStream.cs: don't start any more reads on the socket
after getting a 0 signalling the end. This fixes Ben's infamous foo.cs
test.
svn path=/trunk/mcs/; revision=43916
* WebConnection.cs:
* WebConnectionStream.cs: don't start reading until we've sent at least
the headers. This way we ensure that a Write happens before any Read,
which is needed by the SSL code.
svn path=/trunk/mcs/; revision=42792
* WebConnection.cs: fix some breakage from my last patch.
* WebConnectionStream.cs: invoke the callback when done even in EndRead.
svn path=/trunk/mcs/; revision=42768
* WebConnection.cs: if we're reading chunked data and didn't use the
stream to read, we gotta set the async. result as complete and invoke
the callback. Don't call nstream.EndRead with the wrong IAsyncResult.
* WebConnectionStream.cs: in EndRead, pass the correct IAsyncResult to
cnc.EndRead. Lock on a field instead of 'this'.
svn path=/trunk/mcs/; revision=42750
* 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
* WebConnection.cs: remove prevStream and don't set busy to false in
HandleError. prevStream is not needed any more and setting 'busy' so
early might let a request skip the queue.
* WebConnectionGroup.cs: decrement the indexer when removing a dead
reference from the arraylist.
* WebConnectionStream.cs:
(ReadAll): call NextRead if it has not been called before even when
we have completed the request. Reuse the read buffer when reading a
response of unknown size. Increase the buffer to 8kB.
(BeginRead): increase pendingReads earlier and even when reading from
the internal buffer.
(EndRead): decrease pendingReads later and always.
svn path=/trunk/mcs/; revision=36993
* ChunkStream.cs: simplified condition for WantMore property.
* WebConnection.cs: in Connect(), finish any pending reads we might
have for chunked data. Ignore possible blank lines at the very
beginning of the server response. Honor user set KeepAlive in
HttpWebRequest for HTTP/1.1 connections. Thanks to Eyal Alayuf for
his suggestions and code.
svn path=/trunk/mcs/; revision=35934
* 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: 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
* Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs: get
an HttpWebRequest so that we can use the ServicePoint it has. No
need to get the host now.
* System/System.Net/WebConnection.cs: moved loading of the ssl stream
Type to its own method. Don't create a new ssl stream if we're reusing
the connection.
* System/System.Net/WebConnectionStream.cs: ensure the number of bytes
copied in ReadAll is the expected even if the dta from the server has
extra bytes.
Partial fix for bug #61218. Still problems with POST.
svn path=/trunk/mcs/; revision=31134
* debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
when no HOME env. variable was set and a NullRef was thrown in a .cctor
called from other .cctors.
svn path=/trunk/mcs/; revision=31024
* 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
* ChunkStream.cs: added ChunkLeft property.
* WebConnection.cs:
(EndRead): when using small byte arrays to read from a chunked stream,
ensure we've read the chunk size and try to fulfill the request
completely. fixes bug 59653.
svn path=/trunk/mcs/; revision=28915
* 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
* WebConnection.cs:
* WebConnectionGroup.cs: the requests queue is now shared for all the
connections belonging to the same connection group.
svn path=/trunk/mcs/; revision=23695
* ServicePoint.cs: SendContinue is always false for HTTP/1.0
* WebConnection.cs: get rid of WaitForContinue() (yes!) and prevent
calling more the ContinueDelegate more than once when we get the
headers in several packets.
* WebConnectionStream.cs: removed call to WaitForContinue.
svn path=/trunk/mcs/; revision=23477
* WebConnection.cs: Update previous patch to use HttpsClientStream
(internal in Mono.Security assembly) in place of SslClientStream.
This will reduce reflection and allow to use ICertificatePolicy.
svn path=/trunk/mcs/; revision=23469