This reverts commit 8f09dad435.
8f09dad435 is reverting a merge commit,
which will not do what you think it does. It will revert much more,
so revert the revert to get back the unintentionally reverted commits.
It looks like the next commit (1a15d4ec54)
is doing the original intention (reverting 164f9cbec4),
so this revert will leave the tree in a good state, with no pending
reverts.
* 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).
* System.Net/CookieParser.cs: Replace GetNameValue() with Parse(),
support multiple cookies, errors and "expires=Day, ...".
* Test/System.Net/CookieParserTest.cs: New nunit test suite for that.
After calling Close () on response you are still allowed to access its
properties. Calling Dispose() causes the usual exception to be thrown
when accessing the properties.
Fixes bug #685368.
* System.Net/CookieParser.cs: Add more common/shared code
* System.Net/HttpWebResponse.cs: Move out CookieParser class and some
utility methods so they can be shared with Moonlight http client stack
* System.dll.sources:
* mobile_System.dll.sources:
* moonlight_shared_System.dll.sources:
Add new CookieParser.cs to the build
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
remain accessible after the response is disposed (and the headers are
no longer available). Adding missing disposed checks in properties
(except for StatusCode) and GetResponseHeader. On the 2.0 profile,
headers must remain accessible after the HttpWebResponse is disposed.
* System_test.dll.sources: Added HttpWebResponseTest.cs.
* HttpWebResponseTest.cs: Enabled tests.
svn path=/trunk/mcs/; revision=108804
* HttpWebResponse.cs: do not check the disposed status for properties
and methods that return response data other than the stream itself.
Fixes bug #381223.
svn path=/trunk/mcs/; revision=101389
* HttpWebResponse.cs: convert UTC/GMT Expires DateTime from a cookie
into local time, also set the HttpOnly property if available.
svn path=/trunk/mcs/; revision=95334
* 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
* HttpWebResponse.cs: Handle quotations in the cookies values, per
the spec http://www.faqs.org/rfcs/rfc2109.html, it is allowed to
have quotations.
svn path=/trunk/mcs/; revision=42362
* HttpWebResponse.cs: moved cookie parsing into its own class.
* WebHeaderCollection.cs: remove (probably bogus) GetMultipleValues
call.
* HttpWebRequest.cs: don't let exception raised in the ctor of
HttpWebResponse vanish.
Fixes bug #73275.
svn path=/trunk/mcs/; revision=41670
* 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
* HttpWebResponse.cs: don't lock up when the cookie received ends with
a semicolon. Patch by Darryl VanDorp. Fixes bug #68956.
svn path=/trunk/mcs/; revision=35530
* HttpWebResponse.cs: set-cookie and set-cookie2 can be present more
than once and have multiple values. Don't rely on string.split when
parsing cookie values.
* WebHeaderCollection.cs: same thing for set-cookie and set-cookie2.
Fixed GetValues (it was splitting values that contained a comma) and
changed SetInternal to handle multi-value headers.
Fixes bug #62744.
svn path=/trunk/mcs/; revision=32235
* HttpWebRequest.cs:
* HttpWebResponse.cs: better abort handling and leave the stream in a
stable status on abort.
svn path=/trunk/mcs/; revision=18943
* HttpWebRequest.cs: if CookieContainer has not been set, make HttpWebResponse ignore
Set-Cookie* headers.
* HttpWebResponse.cs: Set-Cookie and Set-Cookie headers removed if CookieContainer have
been provided to the request.
svn path=/trunk/mcs/; revision=15379
* WebClient.cs (DownloadData): Instead of using a MemoryStream,
keep track of all the small chunks in an ArrayList. The
MemoryStream had the property of reallocating itself, and the
problem was that MemoryStream.GetBuffer would return the buffer
(correctly), but not something of the right size. So clients of
DownloadData would get the extra unused bytes as part of the
result.
The solution would have been to make another copy at this point,
instead, we only keep the small allocations around in the
ArrayList, and we only do one large allocation at the end.
* HttpWebResponse.cs: If there is a Content-Length header, pass
this information to our HttpWebResponseStream, so it knows when to
stop, instead of waiting for the stream to be shut down by the
other end.
* HttpWebRequest.cs: Only set the `delay-header-writing' mode on
the underlying stream if the method will do a content transfer and
no Content-Length was provided. If not (HEAD and GET or
Content-Length provided), keep going.
svn path=/trunk/mcs/; revision=13986
* HttpWebRequest.cs: implemented IDisposable, make the request stream
read only. Changed the way of disposing the socket.
* HttpWebResponse.cs: wrapped the socket in a write-only NetworkStream,
handle chunked transfer encoding (no more hangs), added serialization
stuff, call CheckDisposed at the beginning of methods/properties (not
in a finally clause).
svn path=/trunk/mcs/; revision=12283