gmid
gmid copied to clipboard
GG: /.. reported as invalid IRI
Requesting the address gemini://localhost/../
returns the error gg: invalid IRI: illegal path
, even though it should be a valid IRI
gemini://localhost/./...../
(arbitrarily many .
at the end) works, and will return the index of localhost, if requested on a gmid server
good catch, I haven't thought about that case.
gg
uses the same IRI code that gmid use, and so it performs some cleanups that are needed server-side but not on the client.
I had in mind to improve the IRI handling and separate the parsing and cleanup phases, now I have a strong reason to do that :)
If you don't mind, I'd keep this open. While it's not a top-priority, I still like to to eventually fix it ^^"
No problem! just went through my old stuff and removed the inactive-seeming ones
Took a while to fix this, oops :)
When I wrote the parser I was a bit paranoic and decided to reject altogether paths that tried to "escape" the root. However, RFC 3986 § 5.2.4 in the algorithm "remove_dot_segments" explicitly allows for it.