Skip to content

Commit

Permalink
New url session handler (#932)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Manuel de la Pena committed Oct 3, 2016
1 parent eb516cb commit da1478a
Show file tree
Hide file tree
Showing 6 changed files with 632 additions and 27 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
path = external/opentk
url = ../../mono/opentk.git
branch = master
[submodule "external/ModernHttpClient"]
path = external/ModernHttpClient
url = ../../xamarin/ModernHttpClient.git
branch = master
[submodule "external/Xamarin.MacDev"]
path = external/Xamarin.MacDev
url = ../../xamarin/Xamarin.MacDev
Expand Down
1 change: 0 additions & 1 deletion Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ MONOTOUCH_DIALOG_PATH=$(TOP)/external/MonoTouch.Dialog
TOUCH_UNIT_PATH=$(TOP)/external/Touch.Unit
NUNITLITE_PATH=$(TOP)/external/mono/external/nunit-lite
OPENTK_PATH=$(TOP)/external/opentk
MODERNHTTPCLIENT_PATH=$(TOP)/external/ModernHttpClient
XAMARIN_MACDEV_PATH=$(TOP)/external/Xamarin.MacDev
GUI_UNIT_PATH=$(TOP)/external/guiunit
MACCORE_PATH=$(TOP)/../maccore
Expand Down
1 change: 0 additions & 1 deletion external/ModernHttpClient
Submodule ModernHttpClient deleted from 3f66dc
1 change: 0 additions & 1 deletion mk/versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ $(eval $(call CheckSubmoduleTemplate,fsharp,FSHARP))
$(eval $(call CheckSubmoduleTemplate,MonoTouch.Dialog,MONOTOUCH_DIALOG))
$(eval $(call CheckSubmoduleTemplate,Touch.Unit,TOUCH_UNIT))
$(eval $(call CheckSubmoduleTemplate,opentk,OPENTK))
$(eval $(call CheckSubmoduleTemplate,ModernHttpClient,MODERNHTTPCLIENT))
$(eval $(call CheckSubmoduleTemplate,Xamarin.MacDev,XAMARIN_MACDEV))
$(eval $(call CheckSubmoduleTemplate,guiunit,GUI_UNIT))

Expand Down
Loading

0 comments on commit da1478a

Please sign in to comment.