Background:
* Cookie.Port's property setter sets Version to 1, thus forcing strict
RFC 2109 compliance. This is also what the .NET runtime does when
assigning this property.
* When parsing the result of a web request, .NET 4.5 only sets Cookie.Port
when the Set-Cookie: header contains "Version=1".
* Google Chrome does not check cookie ports at all.
* Updated the tests to reflect .NET 4.5's new improved behavior.
* Fixed subdomain matching rules.
* Added some very simple sanity checks, such as same origin and
public suffixes.
This is far from perfect, but the tests now pass with .NET 4.5
and this also fixes a Monotouch bug from one of our customers.
TODO:
* Using 'Cookie.Version = 1' (RFC 2109 compliance) apparently got
broken in .NET 4.5; I disabled the corresponding tests / made
them use the default 'Version = 0' where possible.
* Same origin has not been tested for security (it previously
didn't exist at all) and we should probably use the list at
publicsuffix.org; but .NET 4.5 also allows you to set a cookie
.co.uk (haven't tested their web stack, thoug - it's possible
that they have additional checks there).
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-01-21 Sebastien Pouliot <[email protected]>
* CookieContainerTest.cs: Additional test cases from Tom Philpot
In System.Net:
2010-01-21 Sebastien Pouliot <[email protected]>
* CookieContainer.cs: Fix to cloning and expiration. Patch
by Tom Philpot <[email protected]>
svn path=/trunk/mcs/; revision=149976
2009-12-24 Sebastien Pouliot <[email protected]>
* CookieContainerTest.cs: Split many tests into smaller test
cases. Add test cases for DefaultPerDomainCookieLimit and
DefaultCookieLimit. Remove all [Category ("NotWorking")] since
everything works now.
In System.Net:
2009-12-24 Sebastien Pouliot <[email protected]>
* Cookie.cs: Re-work ToString to be useable in more cases. Fix
some issues found by Gendarme.
* CookieContainer.cs: Fix all NonWorking (and new) unit tests.
Implement removing oldest cookies when limits are reached.
* CookieCollection.cs: Move to generics internally. Fix sort to
be closer to MS implementation (but still not 100% identical).
Fix some issues found by Gendarme.
svn path=/trunk/mcs/; revision=148891
* CookieCollection.cs: Seal class for NET_2_1 (SL3)
* CookieContainer.cs: Seal class for NET_2_1 (SL3)
* NetworkCredential.cs: Use in NET_2_1 (SL3) but without implementing
ICredentialsByHost
svn path=/trunk/mcs/; revision=140055
messages, and improve compatibility with MS. Modified set_Capacity to
no longer change MaxCookieSize when new value is less than
MaxCookieSize.
* CookieTest.cs: Added test for Path.
* CookieContainerTest.cs: Added and improved .ctor tests.
Improved tests for Capacity and MaxCookieSize. Added tests for
PerDomainCapacity. Added tests for Add overloads, GetCookieHeader,
GetCookies and SetCookies. Added test for bug #421827.
svn path=/trunk/mcs/; revision=134295
* CookieContainerTest.cs: the GetCookies test works now.
2007-04-23 Marek Habersack <[email protected]>
* CookieContainer.cs: Sort the collection by the path relevance before returning from
the GetCookies method. Fixes bug #81421.
svn path=/trunk/mcs/; revision=76101
* Cookie.cs: do not return "/" for Path if it wasn't set
explicitly.
* CookieContainer.cs: set cookie path only if its version is
"Netscape" and is null or empty. Fixes#81420.
svn path=/trunk/mcs/; revision=76095
* CookieContainer.cs: send the cookies from the collection we got for
the given URI, not the whole collection.
* HttpWebResponse.cs: only add the cookies to this instance, not to the
cookie container set in the request.
svn path=/trunk/mcs/; revision=65493
* 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
* Test/System.Net/CookieContainerTest.cs: added tests for
CookieContainer.
* System.Net/CookieContainer.cs: style, fixed checks for properties,
implemented the MonoTODOs for the method that take an Uri. GetCookies
and GetCookieHeaders now really return only the cookies that are
requested filtering by the Uri parameter.
* System.Net/Cookie.cs: style, added default values for Comment, Domain
and Port.
* System_test.dll.sources: added CookieContainerTest.cs.
svn path=/trunk/mcs/; revision=36918