* 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
* 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
* SecurityProtocolType.cs: Added missing [Serializable] to enum. Added
Default and Ssl2 to NET_1_2 profile. Enum is now internal for NET_1_0
profile (as we need it for SslClientStream).
* ServicePoint.cs: Added internal SetCertificates(client,server).
* ServicePointManager.cs: Added CheckCertificateRevocationList and
CheckCertificateRevocationList static properties (public in 1.1,
internal for 1.0).
* WebConnection.cs: Dynamically creates a SslClientStream (from
Mono.Security assembly) in case of https. Changed NetworkStream to
Stream everywhere.
svn path=/trunk/mcs/; revision=23225
* 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
* WebConnection.cs: if we get a 100 when we're not waiting for it, set
that information in the ServicePoint.
* WebConnectionStream.cs: send headers in the right order for
non-chunked POST.
svn path=/trunk/mcs/; revision=23204
* ChunkStream.cs:
* WebConnection.cs: fixed bug that caused ChunkStream to return 0 on
Read if it have not yet received any byte of the body but is expecting
a body.
svn path=/trunk/mcs/; revision=22944
* WebConnection.cs: patch by Yaacov Akiba Slama that fixes 100-continue
handling for the case when the same packet also contains the actual
[2-5]xx response.
svn path=/trunk/mcs/; revision=22503
* WebConnection.cs: Data.Init is a bad boy. Lluis realized. He also
tidied up the end of ReadDone. Disabled relaunching the request if 2
InitRead are called, since now we don't throw everything into
RegisterWaitForSingleObject but one request at a time.
* WebConnectionGroup.cs: when checking available connections, allow them
not to be Connected but allocated to honor the connection limit.
* WebConnectionStream.cs: CheckComplete() now checks for nextReadCalled
too. ReadAll don't mess contentLength if it's provided in the headers.
BIG thanks to Lluis. Turns out that we were debugging the same stuff and
his Data.Init discovery was THE thing I was missing.
Fixes bug #51277.
svn path=/trunk/mcs/; revision=21883
* HttpWebRequest.cs: removed unneeded StringBuilder.
* WebConnection.cs: default to keep the connection open for HTTP/1.1
only or HTTP/1.0 + (Proxy-)Connection header. Fixes bug #51208.
svn path=/trunk/mcs/; revision=20513
* WebConnection.cs: turns out that socket.Connected is not useful until
we actually try to send/receive data, even if the other end has already
closed the socket. Added TryReconnect() and Connected.
* WebConnectionData.cs: default value for StatusCode is 0 now.
* WebConnectionGroup.cs: reuse the connection since the beginning,
instead of opening up to ConnectionLimit and then reusing.
* WebConnectionStream.cs: reopen the socket if we're trying to reuse
one which fails on first write.
svn path=/trunk/mcs/; revision=20117
* System.Net/ServicePoint.cs: preparing for recycling. Not yet finished.
* System.Net/ServicePointManager.cs: this is the one that reads config.
* System.Net/WebConnectionGroup.cs: don't read config here.
* System.Net/WebConnection.cs: added the queue again. Launch queued
requests on error.
* System.Net.Configuration/ConnectionManagementHandler.cs: the hashtable
is case insensitive now.
svn path=/trunk/mcs/; revision=18788
* System.Net/WebConnection.cs: the queue is now handled by the
threadpool. Initialize the connection data in a place where it does not
depend on the execution order of the requests in threadpool. More error
handling.
* System.Net/WebConnectionGroup.cs: use the limits in the config file
and reuse connections when the limit is reached.
* System.Net.Configuration/ConnectionManagementHandler.cs: added
GetMaxConnections to return the max. number of simultaneous connections
to a given host.
svn path=/trunk/mcs/; revision=18735
* ChunkStream.cs:
(WantMore): true if we've not received the last chunk yet. Fixes
bug #45463. Thanks to Miguel for tracking this down and providing a
test case.
* WebConnection.cs: removed bogus ^M's.
* WebHeaderCollection.cs: provide more info when the header or value is
wrong.
svn path=/trunk/mcs/; revision=16441
* ServicePoint.cs: Removed Connect and GetEndPoint methods.
Removed reverse resolution when uri is literal IP address.
* WebConnection.cs: IPv6 compatibility update: Try to connect
to all addresses returned by IPHostEntry.
* WebConnectionGroup.cs: Removed unused parameter.
svn path=/trunk/mcs/; revision=16209
* WebConnection.cs: fixed header writing the reusing a connection and
the server does not send 100-continue response.
svn path=/trunk/mcs/; revision=15726
* HttpWebRequest.cs: use InternalClose when we are not going to send the
rest of the request stream because of an error after sending the
headers.
* WebConnection.cs: check for completion after setting the response.
Enable reading in NextRead.
* WebConnectionStream.cs: re-fixed the count for partially buffered
reads. If the network stream returns 0 bytes, we're done.
svn path=/trunk/mcs/; revision=15351
* HttpWebRequest.cs: added ExpectContinue property.
* WebConnection.cs: allow 100 Continue to be delayed after waiting for
it.
svn path=/trunk/mcs/; revision=15252
* HttpWebRequest.cs: don't send "Expect: 100-continue" is the server
is known not to respond to that.
* ServicePoint.cs: added SendContinue property.
* WebConnection.cs: only wait 2 seconds for a continue reply. If it
timeouts, set SendContinue to false and proceeed sending data.
* WebConnectionStream.cs: if 100-continue is not received and instead we
get a 417 or anything else, don't send the data.
* WebClient.cs: implemented all missing properties and methods except
UploadFile.
svn path=/trunk/mcs/; revision=15180