Skip to content

Merge latest fixes from cycle9 - #1917

Merged
spouliot merged 7 commits into
dotnet:xcode8.3from
spouliot:additional-cycle9-merge
Mar 27, 2017
Merged

Merge latest fixes from cycle9#1917
spouliot merged 7 commits into
dotnet:xcode8.3from
spouliot:additional-cycle9-merge

Conversation

@spouliot

Copy link
Copy Markdown
Contributor

No description provided.

spouliot and others added 7 commits March 27, 2017 13:10
…82 (dotnet#1772) (dotnet#1778) (dotnet#1790)

The latest NSUrlSessionHandler implementation switched from loading the
request into memory (NSData) to loading it from a stream (NSInputStream).
The later is more efficient, at least for large POST'ed requests which
could, in theory, not even fit in memory.

Now using a stream means a different API is used. NSMutableUrlRequest
Body and BodyStream properties are exclusive but also a bit different as
the later won't set Content-Length [1] and switch to chunked encoding [2]

Even if the current code is compliant with HTTP/1.1 this breaks some
common POST/PUT usage that worked "as expected" in the previous (C8)
release.

To fix this we ask for the stream's length. We assume that if the length
is known then it's (likely) already (or fitting) in memory and use the
(old, in memory) Body property, which will set Content-Length.

If the length is unknown then we use the BodyStream approach so large
POST will continue to work (well over past/C8 limits).

Finally there might be case where developers will prefer to avoid the
extra memory (of `Body`) so a new property `MaxInputInMemory` is added
to set a maximum. It defaults to `Int64.MaxValue` so `Body` will be
used whenever possible. It can be set to `0` to get back the original C9
(always use a stream) behavior.

references:
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=52682
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=52711
[3] https://devforums.apple.com/message/919330#919330
…dotnet#1777)

- Update comments on XM45.targets file
- Remove unnecessary AssemblySearchPaths hack causing issues using nugets with same name as Facades
- Note: MSBuild with XM 4.5 is still broken for now
commit mono/mono@89b94ad
Merge: e4a3cf3 62de34e
Author: Rodrigo Kumpera <kumpera@users.noreply.github.com>
Date:   Tue Feb 21 02:32:06 2017 -0500

    Merge pull request dotnet#4356 from BrzVlad/fix-52300

    [sgen] Don't restart threads with invalid stack start

https://bugzilla.xamarin.com/show_bug.cgi?id=52300
…SUrlSessionHandler. Fixes #51423 (dotnet#1888)

Do pass the cancelation token in the NSUrlSessionHandler to ensure that
if the request is cancelled we do not hang for ever.

https://bugzilla.xamarin.com/show_bug.cgi?id=51423
…SessionTask (dotnet#1900)

If the request is canceled, the inflight data is cleaned up. That allows
us to know that the NSUrlSessionTask should be canceled, which will
execute the DidCompleteWithError that will take care of the cleanup of
resources and will ensure that everything is back to a known situation.

* Do check for managed cancelations in the GetInflightData so that it is check in all handlers.
@monojenkins

Copy link
Copy Markdown
Contributor

Build failure

@spouliot

Copy link
Copy Markdown
Contributor Author

Build failed at install time since the Xcode-select pointed to the new Xcode. We'll trust wrench results to save time (and since all those commits were already PR reviewed/tested).

@spouliot
spouliot merged commit 86dbc5d into dotnet:xcode8.3 Mar 27, 2017
@spouliot
spouliot deleted the additional-cycle9-merge branch March 27, 2017 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants