garycourt/uri-js

WS URI parsing not RFC conform?

Opened this issue · 0 comments

I'm not quiet sure if this is a bug, but I think a Websocket URI is not parsed correctly.
I think the result should be something like this due to this RFC6455 which refers to this rfc3986#section-3.3:

const x = URI.parse('ws://localhost:8080/example?foo=bar');
//returns:
//{
//	scheme : "ws",
//	host: "localhost",
//     port: "8080",
//	path: "/example",
//	query: "?foo=bar",
//	ressourceName: "/example?foo=bar"
//}

The attribute ressouceName shall contain path and query and path shall not be empty, only if there is no path