Skip to content

Conversation

@fhammerl
Copy link
Contributor

@fhammerl fhammerl commented Jun 19, 2023

Part of an effort to synchronize http_proxy behaviour across ARC, actions/toolkit and actions/runner

The consensus was to follow golang default behaviour in case of a missing protocol in the value of http(s)_proxy.

  • golang: prepend http:// if missing - e.g https_proxy=localhost:1234 is the same as https://localhost:1234
  • actions/toolkit: throw if protocol is missing from proxy url
  • actions/runner: ignore and don’t use proxy if protocol is missing from proxy url

Before this commit, these URIs used to be ignored (nullproxy).

The new behaviour aligns with go style http(s)_proxy
@fhammerl fhammerl requested a review from a team as a code owner June 19, 2023 13:50
nikola-jokic
nikola-jokic previously approved these changes Jun 19, 2023
Copy link
Contributor

@nikola-jokic nikola-jokic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fhammerl fhammerl merged commit 5f1c6f4 into main Jun 20, 2023
@fhammerl fhammerl deleted the fhammerl/align-with-go-style-http-s-proxy branch June 20, 2023 13:53
ashb pushed a commit to ashb/runner that referenced this pull request Jun 23, 2023
* Add 'http://' to http(s)_proxy if there is no protocol

Before this commit, these URIs used to be ignored (nullproxy).

The new behaviour aligns with go style http(s)_proxy

* Update src/Runner.Sdk/RunnerWebProxy.cs

Co-authored-by: Nikola Jokic <[email protected]>

* Assert that original protocol is preserved

* Use startsWith for testing protocol

* Only modify proxy if useful

---------

Co-authored-by: Nikola Jokic <[email protected]>
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.

3 participants