evo-lua / evo-luvi

[Obsolete] Experimental Lua runtime environment built on Luvi (libuv + LuaJIT)
https://evo-lua.github.io
Apache License 2.0
1 stars 0 forks source link

Add a URL module to implement standardized URL processing for HTTP request targets #168

Open Duckwhale opened 1 year ago

Duckwhale commented 1 year ago

Can probably port the one from NodeJS: https://nodejs.org/api/url.html#the-whatwg-url-api

Source: https://github.com/nodejs/node/blob/v19.3.0/lib/url.js

Some of the more esoteric features (internationalization) may not be very useful here. I'm mostly interested in the test cases, really.

Roadmap:


Required for #137

Duckwhale commented 1 year ago

After looking at the NodeJS code, it seems that porting their WHATWG URL module directly might be more trouble than it's worth:

All in all, this will be more work than originally anticipated. Instead, there may be some alternatives worth considering:

Lastly, I wonder how important having this module right now actually is. I want to get to WebSockets ASAP and having some basic HTTP functionality, just enough to complete the handshake really, might be enough even if the implementation isn't a fully spec-compliant HTTP server (or client, for that matter). So, perhaps shelving this until later is the better approach here.