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

Server url with ipv6 address does not work #909

Open
chkp-meitalka opened this issue Aug 15, 2024 · 0 comments
Open

Server url with ipv6 address does not work #909

chkp-meitalka opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@chkp-meitalka
Copy link

Description

If in the openapi spec the /server/url value uses an ipv6 address (for example, https://[2620:0:2a03:92:5a::210]/my_api/v1), RESTler will fail, and will show an error on the network.testing.* log file saying "Unknown error: 'Exception Creating Socket: [Errno -3] Try again'".

I think that this happens here in the code:

with socket.create_connection((target_ip, target_port or 443)) as sock:

When I tried to manually use the socket.create_connection() method with the address in square brackets and port 443 it raised the same exception, and when I provided the address without the square brackets it successfully created a socket.

When I try to remove the square brackets in the url it just writes "Unknown error: 'Exception Creating Socket: [Errno 22] Invalid argument'"

Steps to reproduce

  1. Get a server with an IPv6 address.
  2. Write an OpenApi spec for it and put the IPv6 address in square brackets as the host in the url.
  3. Compile and run RESTler with this open api spec.

Expected results

I expect requests to the server to be successful when the IPv6 address is written in square brackets as the host in the url.

Actual results

Failure to open socket by RESTler.

Environment details

Linux, Python 3.12.3, Using mcr.microsoft.com/dotnet/aspnet:6.0-alpine image as base.

@marina-p marina-p self-assigned this Aug 26, 2024
@marina-p marina-p added the bug Something isn't working label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants