* 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).
The first part was to try to repro the ordering behavior of MS which seems to be based on the string length of, first, the domain and, then, the path.
Second part was to fix the .local unit test with Dns.GetHostname as some OS (namely Mac) append a '.local' by default to the hostname.
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
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
* 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