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

Fix: Handle IPv6 hostname correctly (closes #806) #933

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

JohannaHartmann
Copy link
Contributor

Wrapped the hostname in brackets to separate it from the port, when it is an IPv6 address.
It is an attempt to fix the issue #806.

Is the net_http_spec.rb the right place for the added specs or should I rather put them into a new file net_http_utility_spec.rb?

@bblimke
Copy link
Owner

bblimke commented Mar 5, 2021

Thank you @JohannaHartmann

In terms of specs, I think ideally it would be to add generic specs for stubbing and request expectations
and enable them for each client that supports IPv6, but this will likely require changes in all adapters.
For now I would at least add a few examples like you added to net_http_spec.rb, but specs that work against WebMock API,
e.g. using stub_request or expect request and don't know about WebMock internals like NetHttpUtility

@bblimke bblimke merged commit 79e60c9 into bblimke:master Mar 5, 2021
@bblimke
Copy link
Owner

bblimke commented Mar 5, 2021

Thank you @JohannaHartmann !

@bblimke
Copy link
Owner

bblimke commented Mar 5, 2021

It's released as 3.12.1

This was referenced Mar 7, 2021
This was referenced Mar 8, 2021
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