Skip to content

urlsplit in Python 2.6.1 and earlier doesn't parse ws or wss properly. #59

@dsully

Description

@dsully
>>> urlsplit('ws://localhost:8080/some-path')
SplitResult(scheme='ws', netloc='', path='//localhost:8080/some-path', query='', fragment='')

This results in 'host' being None, and an obtuse 'Connection Refused' message passed to close(), but without enough information to debug.

I see that 'websocket-client' has it's own _parse_url method that works around this bug:

https://github.com/liris/websocket-client/blob/master/websocket.py#L105

I'll try and work up a patch, if a solution like the above is reasonable?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions