Commit Graph
37 Commits
Author SHA1 Message Date
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Martin Baulig f7f1bb819c [Http]: Cleanup and simplify the ServicePoint's connection group list. 2014-05-21 18:47:41 +02:00
Martin Baulig c6a70a9586 Rewrite and fix the web stack's connection reuse and idle logic.
* ServicePoint now uses an idle timer to close idle connections.

* WebConnectionGroup has been mostly rewritten to use a linked
  list of open connections and their idle times.

  This fixes both the problem that we were leaking sockets and
  that we were not reusing existing connections.

* ServicePoint now correctly keeps track of the number of open
  connections.

* ServicePointManager now uses the correct default idle time
  of 100 seconds (previously 15 minutes).

* WebConnection uses the new WebConnectionGroup's busy logic
  to correctly flag connections as busy / reusable.
2014-02-13 14:17:14 +01:00
Miguel de Icaza aee1c0e645 ServicePoint: Use DateTime.UtcNow internally, which avoids looking up the timezone every minute 2013-02-12 00:48:15 -05:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
2012-06-02 13:16:40 -04:00
Miguel de Icaza 086885471f Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:20:12 -04:00
Gonzalo Paniagua Javier 891af303aa [Socket] Implemented TCP keep alive support
Implemented SetTcpKeepAlive for ServicePoint*.
2011-01-13 18:28:16 -05:00
Sebastien Pouliot 355a27b73d In System.Timers:
2010-03-19  Sebastien Pouliot  <[email protected]>

	* Timer.cs: Removed old NET_2_0 defines and added some new
	MOONLIGHT defines (needed for the client stack)

In System.Net:
2010-03-19  Sebastien Pouliot  <[email protected]>

	* AuthenticationManager.cs: Internal type for Moonlight.
	Add BasicClient, DigestClient, NtlmClient for NET_2_1 since
	this applies to both monotouch and moonlight (client stack).
	Removed unneeded NET_2_0 defines
	* CookieContainer.cs: For Moonlight it needs to be internal in 
	System.dll and public in System.Net.dll. Removed unneeded NET_2_0
	defines
	* HttpContinueDelegate.cs: Internal type for Moonlight.
	* HttpRequestCreator.cs: Remove a MOONLIGHT define
	* HttpStatusCode.cs: For Moonlight it needs to be internal in 
	System.dll and public in System.Net.dll
	* HttpWebRequest.cs: Internal type for Moonlight. Change S.Config
	to NET_2_1 defines (applies to both monotouch and moonlight).
	Removed unneeded NET_2_0 and NET_1_1 defines
	* HttpWebResponse.cs: Internal type for Moonlight. Removed 
	unneeded NET_2_0 defines
	* IAuthenticationModule.cs: Internal type for Moonlight.
	* ICertificatePolicy.cs: Internal type for Moonlight.
	* ICredentialPolicy.cs: Internal type for Moonlight. Removed 
	unneeded NET_2_0 defines
	* IWebRequestCreate.cs: For Moonlight it needs to be internal in 
	System.dll and public in System.Net.dll
	* ServicePoint.cs: Internal type for Moonlight. Change S.Config
	to NET_2_1 defines (applies to both monotouch and moonlight)
	* ServicePointManager.cs: Remove a MOONLIGHT define
	* WebException.cs: For Moonlight it needs to be internal in 
	System.dll and public in System.Net.dll. Removed unneeded NET_2_0
	defines
	* WebHeaderCollection.cs: Internal type for Moonlight. Removed 
	unneeded NET_2_0 defines
	* WebRequest.cs: Internal type for Moonlight. Change S.Config
	to NET_2_1 defines (applies to both monotouch and moonlight)
	* WebResponse.cs: Internal type for Moonlight. Removed unneeded
	NET_2_0 defines

In System.Net.Sockets:
2010-03-19  Sebastien Pouliot  <[email protected]>

	* Socket.cs: Remove some NET_2_0 defines (using) and add a few
	MOONLIGHT defines needed to reuse Socket in the client http stack
	* Socket_2_1.cs: Remove some MOONLIGHT defines
	* SocketAsyncEventArgs.cs: For Moonlight check policy if outside
	System.dll (the client stack use sockets with it's own web 
	xdomain policy)

In System:
2010-03-19  Sebastien Pouliot  <[email protected]>

	* Uri.cs: Remove some MOONLIGHT defines

In .:
2010-03-19  Sebastien Pouliot  <[email protected]>

	* moonlight_*_System.dll.sources: Bring extra types so we can
	build a full, managed, internal HTTP stack to be reused for SL3+
	* Makefile: Add a INSIDE_SYSTEM define when compiling System.dll
	to makes it possible to rebuild the same types in System.Net.dll


svn path=/trunk/mcs/; revision=153916
2010-03-19 19:01:31 +00:00
Jb Evain ba61ae505e use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153655
2010-03-16 12:07:46 +00:00
Gonzalo Paniagua Javier baa3d5ff39 2009-12-21 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionGroup.cs:
	* ServicePoint.cs: implemented CloseConnectionGroup().


svn path=/trunk/mcs/; revision=148813
2009-12-21 17:12:57 +00:00
Jb Evain f2a6f61bad use a 2.0 network stack for MONOTOUCH
svn path=/trunk/mcs/; revision=139255
2009-08-02 15:43:12 +00:00
Gonzalo Paniagua Javier d0aef15578 2009-07-01 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* ServicePoint.cs: UseNagleAlgorithm determines NoDelay value.


svn path=/trunk/mcs/; revision=137202
2009-07-01 16:49:32 +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
Atsushi Eno 526b9e66b9 2007-11-13 Atsushi Enomoto <[email protected]>
* WebRequest.cs : added missing ImpersonationLevel (NIE).
	* SecurityProtocolType.cs : not [Serializable] in 2.0.
	* ServicePoint.cs : no GetHashCode() in 2.0.
	* WebRequestMethods.cs : fixed wrong STOU.
	* FileWebResponse.cs : no Dispose(true) in 2.0 API.


svn path=/trunk/mcs/; revision=89537
2007-11-13 10:06:27 +00:00
Atsushi Eno b572fe6faa 2007-08-09 Atsushi Enomoto <[email protected]>
* HttpWebRequest_2_1.cs, HttpWebResponse_2_1.cs :
	  added new sources for those classes for 2.1 (in 2.1 they are
	  almost abstract, while in 2.0 they are concrete).
	* HttpRequestCreator.cs, ServicePoint.cs :
	  #ifdef 2.0 dependencies out.

	* net_2_1_System.dll.sources :
	  Replaced HttpWebRequest and HttpWebResponse with those for 2.1,
	  and removed related 2.0-only types.


svn path=/trunk/mcs/; revision=83773
2007-08-09 16:57:36 +00:00
Dick Porter d4402975ad 2007-06-28 Chris Howie <[email protected]>
* ServicePoint.cs: Implemented BindIPEndPointDelegate.
	* FtpWebRequest.cs: Respect ServicePoint.BindIPEndPointDelegate.
	* WebConnection.cs: Respect ServicePoint.BindIPEndPointDelegate.

2007-06-28  Chris Howie  <[email protected]>

	* ServicePointTest.cs: Add some loose tests for
	ServicePoint.BindIPEndPointDelegate.


svn path=/trunk/mcs/; revision=83666
2007-08-08 13:14:21 +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
Adar Wesley 831089227a 2007-05-16 Adar Wesley <[email protected]>
* System20.csproj: added classes to compilation set IOControlCode.cs,
	IPPacketInformation.cs

	* CookieCollection.cs: added missing method strongly typed CopyTo.

	* CredentialCache.cs: added missing methods Add, Remove, GetCredential

	* HttpWebRequest.jvm.cs: added missing ClientCertificates getter.

	* ServicePoint.cs: added missing method CloseConnectionGroup.

	* WebClient.cs: added missing methods OnDownloadProgressChanged,
	OnUploadProgressChanged, GetWebRequest, GetWebResponse

	* WebHeaderCollection.cs: added missing methods IsRestricted, Add,
	Remove, Set.

	* WebProxy.cs: added missing method GetObjectData.

	* Socket.jvm.cs: added missing methods EndDisconnect, IOControl,
	Send 2.0 overloads, Receive 2.0 overloads, ReceiveMessageFrom,
	BeginReceiveMessageFrom, EndReceiveMessageFrom, 
	EndAccept 2.0 overloads, BeginSend, EndSend, BeginReceive, 
	EndReceive, SendFile, BeginSendFile, EndSendFile, Disconnect,
	DuplicateAndClose

svn path=/trunk/mcs/; revision=77472
2007-05-16 12:03:13 +00:00
Konstantin Triger d1b1213b32 * ServicePointManager.cs: correct assignment typo.
* ServicePoint.cs: Remove unneeded locks for getters, add internal setter.

svn path=/trunk/mcs/; revision=68948
2006-12-04 14:08:53 +00:00
Andrew Skiba 901e94e1e8 compile System.dll in GH
svn path=/trunk/mcs/; revision=67512
2006-11-08 12:34:58 +00:00
Gonzalo Paniagua Javier f99652e387 2005-05-03 Gonzalo Paniagua Javier <[email protected]>
* ServicePoint.cs: HostEntry needs to be thread safe.


svn path=/trunk/mcs/; revision=43966
2005-05-03 17:51:42 +00:00
Gonzalo Paniagua Javier 7ce7ccda6c 2005-04-07 Gonzalo Paniagua Javier <[email protected]>
* WebHeaderCollection.cs: added if-modified-since to the list of
	restricted headers.

	* ServicePoint.cs: use a field object when locking.


svn path=/trunk/mcs/; revision=42651
2005-04-07 20:03:43 +00:00
Gonzalo Paniagua Javier 7b5d49ae29 2004-10-04 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-10-04 20:25:38 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Gonzalo Paniagua Javier ec49116c9e 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-05-13 02:26:55 +00:00
Gonzalo Paniagua Javier ce62c7590a Removed Consoles and ^Ms
svn path=/trunk/mcs/; revision=27209
2004-05-13 02:05:19 +00:00
Lluis Sanchez 5b6c491d20 * HttpWebRequest.cs: Use a lock block instead of Monitor.Enter/Exit, so
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
2004-03-29 12:17:03 +00:00
Gonzalo Paniagua Javier 167ad12050 2004-02-26 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-02-26 01:35:43 +00:00
Sebastien Pouliot 4024cd5c4c 2004-02-18 Sebastien Pouliot <[email protected]>
* 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
2004-02-18 17:58:22 +00:00
Gonzalo Paniagua Javier ed924f816b 2004-02-18 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-02-18 17:14:37 +00:00
Gonzalo Paniagua Javier d3f150312d 2003-10-09 Gonzalo Paniagua Javier <[email protected]>
* 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
2003-10-09 03:31:08 +00:00
Jerome Laban b9828aaebf 2003-07-14 Jerome Laban <[email protected]>
* 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
2003-07-14 15:09:47 +00:00
Gonzalo Paniagua Javier ddf5ef623a 2003-06-08 Gonzalo Paniagua Javier <[email protected]>
* 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
2003-06-08 13:47:28 +00:00
Gonzalo Paniagua Javier cc8432099d Reworked HttpWebRequest and related classes.
svn path=/trunk/mcs/; revision=15149
2003-06-06 06:57:36 +00:00
Lawrence Pit afc721a8ae * WebProxy.cs: added, implemented
* ServicePoint.cs: implemented most
	* ServicePointManager.cs: implemented
	* HttpWebRequest.cs: started implementation
	* HttpWebResponse.cs: improved disposable routines
	* FileWebRequest.cs: slight improvement of Close method

svn path=/trunk/mcs/; revision=4793
2002-05-20 18:40:55 +00:00
Lawrence Pit c24932898e 2002-05-06 Lawrence Pit <[email protected]>
* WebRequest.cs: added
	* WebResponse.cs: implemented
	* WebException.cs: implemented
	* WebHeaderCollection.cs: added
	* HttpVersion.cs: implemented
	* HttpContinueDelegate.cs: added
	* IWebProxy.cs: added
	* IWebRequestCreate.cs: added
	* ICertificatePolicy.cs: added
	* ServicePoint.cs: stubbed
	* ServicePointManager.cs: stubbed
	* CookieContainer.cs: added
	* Authorization.cs: implemented

svn path=/trunk/mcs/; revision=4315
2002-05-05 18:37:57 +00:00