Skip to content

Fix HTTPS proxy support#48

Merged
olleolleolle merged 2 commits into
lostisland:mainfrom
richardmarbach:fix_tls_proxy_support
Nov 13, 2024
Merged

Fix HTTPS proxy support#48
olleolleolle merged 2 commits into
lostisland:mainfrom
richardmarbach:fix_tls_proxy_support

Conversation

@richardmarbach

Copy link
Copy Markdown
Contributor

Hey, I'd like to apologise for the oversight in #47. I miscounted the arguments to the existing Net::HTTP constructor, as I had only tested directly with the Net::HTTP object. I tested this change directly with the adapter, and it's correct now.

The nil argument is a "Proxy Filter". I think it's safe to disable as Faraday doesn't seem to support proxy filters.

Sorry again for the oversight

@olleolleolle

Copy link
Copy Markdown
Member

Is it possible to add tests which would fail with the previous implementation?

Ensure proxy settings are set correctly.
Currently proxy_use_ssl is not exposed as a public method by net-http, so we need to check the instance variable.
@richardmarbach

richardmarbach commented Nov 13, 2024

Copy link
Copy Markdown
Contributor Author

@olleolleolle I've added some specs to check that both the HTTP and HTTPS options are set correctly. The specs also fails with the previous implementation

@olleolleolle olleolleolle merged commit e2ab196 into lostisland:main Nov 13, 2024
@richardmarbach richardmarbach deleted the fix_tls_proxy_support branch November 13, 2024 09:06
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.

2 participants