Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[maccatalyst] Make sure MacProxy is included in System.Net.Http #91473

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

steveisok
Copy link
Member

@steveisok steveisok commented Sep 1, 2023

Fixes #90258

#90258 identified that HttpClient.DefaultProxy returned System.Net.Http.HttpNoProxy when using MacCatalyst. This is due to System.Net.Http.csproj not having maccatalyst as a condition when including MacProxy sources.

Way back when, #47823 had the condition, but this appears to have changed in #48652 when we thought MacCatalyst would inherit settings from iOS. That turned out to not be the case and this check was never added back.

dotnet#90258 identified that `HttpClient.DefaultProxy` returned `System.Net.Http.HttpNoProxy` when using MacCatalyst. This is due to a condition in System.Net.Http.csproj not including maccatalyst as a condition and as a result, skipped adding the MacProxy sources.

Way back when, dotnet#47823 had the condition, but this appears to have changed in dotnet#48652 when we thought MacCatalyst would inherit settings from iOS. That turned out to not be the case and this check was never added back.
@ghost
Copy link

ghost commented Sep 1, 2023

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

#90258 identified that HttpClient.DefaultProxy returned System.Net.Http.HttpNoProxy when using MacCatalyst. This is due to System.Net.Http.csproj not having maccatalyst as a condition when including MacProxy sources.

Way back when, #47823 had the condition, but this appears to have changed in #48652 when we thought MacCatalyst would inherit settings from iOS. That turned out to not be the case and this check was never added back.

Author: steveisok
Assignees: steveisok
Labels:

area-System.Net.Http

Milestone: -

@steveisok steveisok requested a review from wfurt September 1, 2023 17:34
@steveisok
Copy link
Member Author

/azp run runtime-maccatalyst

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@steveisok steveisok merged commit f9db6b4 into dotnet:main Sep 5, 2023
@steveisok
Copy link
Member Author

/backport to release/8.0

@steveisok
Copy link
Member Author

/backport to release/7.0-staging

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6086905990

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/6086908252

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

@steveisok backporting to release/7.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [maccatalyst] Make sure MacProxy is included in System.Net.Http
Using index info to reconstruct a base tree...
M	src/libraries/System.Net.Http/src/System.Net.Http.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Net.Http/src/System.Net.Http.csproj
CONFLICT (content): Merge conflict in src/libraries/System.Net.Http/src/System.Net.Http.csproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [maccatalyst] Make sure MacProxy is included in System.Net.Http
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

@steveisok an error occurred while backporting to release/7.0-staging, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@MihaZupan
Copy link
Member

Is there a way to test this?
If it's important enough of a feature to backport, it'd be nice if we had some coverage given that changes to the csproj can silently break it.

@steveisok
Copy link
Member Author

Is there a way to test this? If it's important enough of a feature to backport, it'd be nice if we had some coverage given that changes to the csproj can silently break it.

How do we test it now? MacCatalyst can be thought of as osx in this particular case.

@MihaZupan
Copy link
Member

public void Proxy_UseEnvironmentVariableToSetSystemProxy_RequestGoesThruProxy()
looks like it could be the relevant test.

steveisok pushed a commit to steveisok/runtime that referenced this pull request Sep 8, 2023
carlossanlop pushed a commit that referenced this pull request Sep 11, 2023
… System.Net.Http (#91817)

* [release/7.0-staging] [maccatalyst] Make sure MacProxy is included in System.Net.Http

Backport of #91473 to release/7.0

* Additional conditions

---------

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
@karelz karelz added this to the 9.0.0 milestone Sep 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 14, 2023
@karelz karelz added the os-maccatalyst MacCatalyst OS label Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClientWebSocket.ConnectAsync() does not work on Mac
4 participants