websockets-rs / rust-websocket

A WebSocket (RFC6455) library written in Rust
http://websockets-rs.github.io/rust-websocket/
MIT License
1.54k stars 222 forks source link

Handle username/password from URL #236

Closed zopieux closed 5 years ago

zopieux commented 5 years ago

This makes ws://john:pswd@example.org/ to be correctly handled instead of being silently ignored.

Rationale: this project is supposedly implementing RFC6455 that states[1]:

URI scheme syntax
   Using the ABNF [RFC5234] syntax and ABNF terminals from the URI
   specification [RFC3986]:

        "ws:" "//" authority path-abempty [ "?" query ]

And RFC3986 states[2] that 'authority' may include a username and password.

[1] https://tools.ietf.org/html/rfc6455#section-11.1.1 [2] https://tools.ietf.org/html/rfc3986#section-3.2.1

vi commented 5 years ago

Published v0.23.0.