invisibleroads / invisibleroads/socketIO-client

IPv6 support

Open
#172 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
441
Forks
204
PR merge metrics
No merged PRs in 30d

Description

The url parser is broken for raw IPv6 addresses. The extra colons in the output from `parsers.parse_host` confuse other parts of the code.

A simple fix is to apply this patch to `socketIO_client/parsers.py`:
```
20c20,23
< url = '%s:%s%s/%s' % (url_pack.hostname, port, url_pack.path, resource)
---
> if ':' in url_pack.hostname:
> url = '[%s]:%s%s/%s' % (url_pack.hostname, port, url_pack.path, resource)
> else:
> url = '%s:%s%s/%s' % (url_pack.hostname, port, url_pack.path, resource)
```

That worked for me, but there might be a better way to do this. In either case, please fix this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.