LUA-URI-HTTP(3)
π NAME π
lua-uri-http β HTTP URI support for the Lua URI library π¦
okay bestie, listen, this is the page about how the Lua URI library handles http and https links, and it's literally so straightforward, you're gonna eat this up π
β¨ DESCRIPTION β¨
So the classes uri.http and uri.https are the ones you reach for when your URI has the http or https scheme respectively. Simple. Iconic. No notes. π
Here's the family tree, and the way it works is giving inheritance:
uri.httpinherits from the generic uri class πΈuri.httpsinherits fromuri.httpπ
So yes, uri.https is lowkey the baby of uri.http, and uri.http is the main character.
π© Big red flag incoming: an HTTP or HTTPS URI that contains any userinfo part is considered to be invalid. Not "kinda sus", not "we'll allow it" β invalid, periodt. So don't put userinfo in there, bestie, it's not the vibe.
Also, an empty path gets normalized to / β because browsers usually do that anyway, and fr fr an empty path just cannot be used in an HTTP GET request. So the library is doing you a solid and fixing it for you. π«Ά
Now the ports, and this part you should highkey memorize:
- default port for the
httpscheme is 80 β - default port for the
httpsscheme is 443 π
And here's the part where the page says something a lil wild: there are no extra methods defined for telnet URIs β only those described in lua-uri(3). Yes, it says telnet, and I'm just relaying it exactly as it's written, no editing, no cap π. If you want the methods, go read lua-uri(3), that's where they live.
π REFERENCES π
So, as far as the author can tell, there is no up to date specification of the syntax of HTTP URIs π which is honestly so real of the internet. Because of that, this class is based on:
That's it, that's the whole sourcing situation. Historic, honestly. π
Version 1.1, dated 2012-00-00 β yeah bestie, this page is a vintage, it's giving classic, and it still slays. Bye, ily, go build some URIs πβ¨
π¦ where this page comes from
- debian trixie: lua-uri 0.1+20130926+git14fa255d-3 Β· MIT
- ubuntu noble: lua-uri 0.1+20130926+git14fa255d-3 Β· MIT
- ubuntu questing: lua-uri 0.1+20130926+git14fa255d-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms