* [System]: Enable some System.Net.Requests tests from CoreFX.
* tests.make: add `$(XTEST_HARNESS_PATH)` to `TEST_MONO_PATH`,
so we can find xunit.assert.
* corefx/SR.cs: add `System.Net.Requests` resources from corefx.
* HttpWebRequest: See below for detailed summary.
* Match parameter names of overridden base class members.
* Fixed order of some argument / state checks to match the
tested behavior.
* Most async methods now throw exceptions instead of returning
faulted tasks when called with incorrect arguments.
* HttpWebResponse.ContentType: use `string.empty` as default.
* WebConnectionStream.FlushAsync: override to return a finished task.
* HttpWebRequestTest.AllowReadStreamBuffering: removed this test.
* test-helpers/RemoteExecutorConsoleApp: silently ignore compiler-
generated helper methods.
Enabled tests from CoreFX:
--------------------------
Added the following tests from external/corefx/src/System.Net.Requests/tests:
* AuthorizationTest, FileWebRequestTest, GlobalProxySelectionTest,
HttpRequestCachePolicyTest, HttpWebRequestTest, HttpWebResponseHeaderTest,
HttpWebResponseTest, LoggingTest, RequestStreamTest, WebRequestTest
Not working yet:
* AuthenticationManagerTest, FtpWebRequestTest
We are currently using
../../../external/corefx/src/System.Net.Requests/tests/*.cs:AuthenticationManagerTest.cs,FtpWebRequestTest.cs
Summary of HttpWebRequest changes:
----------------------------------
* Host - we are now using the implementation from corefx.
* DefaultMaxResponseHeadersLength (unused) - fix default value.
* AllowReadStreamBuffering (unused) - allow this property to
be read/written.
* ContinueTimeout - likewise.
* DefaultCachePolicy (unused) - allow this property to be
read/written and set default value.
* DefaultMaximumErrorResponseLength (unused) - likewise.
* Connection - use implementation from corefx.
* Method - use implementation from corefx, which has additional
error checks.
* MaximumResponseHeadersLength - use implementation from corefx,
adding error checks.
* ReadWriteTimeout - likewise.
* ProtocolVersion - include parameter name in ArgumentException.
* TransferEncoding - use implementation from corefx.
* BeginGetRequestStream / GetRequestStreamAsync / GetRequestStream:
throw exceptions when called with incorrect arguments rather than
returning faulted tasks.
* Disable the corefx tests for the moment.
* Bump API snapshot submodule
* Update tests.make
We are now using nested streams to take care of buffering, chunked encoding and automatic decompression.
GZip / Deflate decompression have been moved inside `WebResponseStream`, the `HttpWebResponse` now always returns a `WebResponseStream` (and not a `GZipStream`) because we have to do extra book-keeping after reading the entire content.
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