Skip to content

Conversation

@spouliot
Copy link
Contributor

No description provided.

nberardi and others added 3 commits May 20, 2016 08:52
This is a rewrite of the ModernHttpClient version of NSUrlSessionHandler, it has better handling for memory that provides a more consistant memory footprint. It accomplishes this by using NSInputStream for requests, and reading and disposing directly from NSData instead of transitioning the NSData to a byte[] array.
@xamarin-release-manager
Copy link
Collaborator

Build success

@spouliot spouliot added the do-not-merge Do not merge this pull request label Jun 11, 2016
@spouliot
Copy link
Contributor Author

That solved the build issue.

There's one breaking change in the API:

Type Changed: System.Net.Http.NSUrlSessionHandler

Removed property:

    public bool DisableCaching { get; set; }

and it seems that the properties from HttpCLientEx.cs (with a partial type for NSUrlSessionHandler)

  • AllowAutoRedirect and
  • Credentials

are no longer honoured, so they will be broken as the PR currently stands.

@xamarin-release-manager
Copy link
Collaborator

Build success

@spouliot spouliot added the requires-qa-before-merge The pull request requires QA to approve it before it can be merged label Jun 12, 2016
Mostly my comments in PR dotnet#174

* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse

PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.

[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] dotnet#177
@spouliot spouliot removed the do-not-merge Do not merge this pull request label Jun 12, 2016
@xamarin-release-manager
Copy link
Collaborator

Build success

@spouliot
Copy link
Contributor Author

@nberardi QA tests failed as the new implementation hangs while running one of our sample: https://github.com/xamarin/monotouch-samples/tree/master/HttpClient

I'll have a look again later, but we're busy with WWDC/Xcode8 right now - in case you want to see what's going :)

@nberardi
Copy link
Contributor

nberardi commented Aug 4, 2016

@spouliot I will have a look. Can I have access to the test procedures or script so that I can run in the same way the automated tests run?

@nberardi
Copy link
Contributor

nberardi commented Aug 4, 2016

I have been able to reproduce the hang on the HTTPS request. Is that what you are also seeing?

mandel-macaque pushed a commit that referenced this pull request Sep 20, 2016
Mostly my comments in PR #174

* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse

PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.

[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] #177
@nberardi
Copy link
Contributor

@spouliot I merged this with PR #31 if you want to close in favor of the original PR.

mandel-macaque pushed a commit that referenced this pull request Oct 3, 2016
* Added rewritten NSUrlSessionHandler that handles memory better

This is a rewrite of the ModernHttpClient version of NSUrlSessionHandler, it has better handling for memory that provides a more consistant memory footprint. It accomplishes this by using NSInputStream for requests, and reading and disposing directly from NSData instead of transitioning the NSData to a byte[] array.

* Try to fix build of PR #31

* [foundation] Restore compatibility with the new NSUrlSessionHandler

Mostly my comments in PR #174

* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse

PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.

[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] #177

* [foundation] Restore compatibility with the new NSUrlSessionHandler

Mostly my comments in PR #174

* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse

PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.

[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] #177

* Try to fix build of PR #31

* prevent DEADLOCK in UI code

* Added ConfigureAwait(false) to Task.Delay to prevent DEADLOCK when the stream is being awaited on the UI thread

* added a few more ConfigureAwait(false) statments that were missed on first pass

* Fix some small style issues.

* Set the default value of AllowAutoRedirect to true.
@mandel-macaque
Copy link
Contributor

Closing this as #932 landed with the same changes and extra fixes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-qa-before-merge The pull request requires QA to approve it before it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants