IPv6 redirects are not handled properly. I've got below exception while. trying to connect to IPv6 API server.
requests.exceptions.InvalidURL: Failed to parse: https://[2600:111/api/v1/sessions
The issue is only seen with Windows based IxNetwork 9.05. IxNetwork started redirecting requests from HTTP to HTTPS protocol.
When ixetwork-restpy receives HTTP redirect it executes this part of the code
Link to the code
if str(response.status_code).startswith('3'):
url = response.headers['location']
if url.find('://') != -1:
self._scheme = url[:url.find('://')]
self._hostname = url[url.find('://')+3:url.find('/', url.find('://')+3)]
if self._scheme == 'https':
self._rest_port = 443
host_pieces = self._hostname.split(':') #IPv6 address/port wrongly split using colon
if len(host_pieces) > 1:
self._hostname = host_pieces[0]
self._rest_port = host_pieces[1]
IPv6 redirects are not handled properly. I've got below exception while. trying to connect to IPv6 API server.
The issue is only seen with Windows based IxNetwork 9.05. IxNetwork started redirecting requests from HTTP to HTTPS protocol. When ixetwork-restpy receives HTTP redirect it executes this part of the code Link to the code