uri-js icon indicating copy to clipboard operation
uri-js copied to clipboard

WS URI parsing not RFC conform?

Open fexpal opened this issue 3 years ago • 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

fexpal avatar May 06 '21 15:05 fexpal