What is required to be IRI compliant?
Solene Rapenne
solene at perso.pw
Mon Dec 28 13:40:42 GMT 2020
On Mon, 28 Dec 2020 14:10:36 +0100
"Solderpunk" <solderpunk at posteo.net>:
> On Mon Dec 28, 2020 at 12:59 PM CET, Solene Rapenne wrote:
>
> > the code doesn't check anything, it only serves what is requested [1].
>
> Okay, I just read the complete Vger code, and see that the URL handling
> is indeed pretty minimal. E.g. domain-based virtual hosting would break
> if a request included an explicit port (which would be interpreted as
> part of the hostname), and filenames with spaces in them cannot be
> served (because the %20 encoding of the space character in the URL path
> is not reversed by the server), and queries (which make no sense for
> static content and should be ignored) are not separated from the path.
indeed, using the port in the query would currently break, a patch will
be published soon. I had very few feedback about the daemon and it seem
to work for most people so yes, issues (or lacks of special cases)
are still to be found, but I'd like vger to be production grade though.
> I don't mean this as criticism, obviously for hobby servers something
> like this is perfectly workable. I guess the concern is that we ideally
> want even "production grade" servers to be quite easy to write. Such a
> server would need to handle all the things above and more. Few people
> want to do all that parsing by hand, so would use a library, and because
> URI parsing is so widely used the theory is it's never too hard to find
> a library for your favourite language with your favourite license. This
> is why there are already plenty of production grade (or close to it)
> servers and clients out there. But apparently many URI parsing
> libraries have never been upgraded to also do IRIs. I had hoped Vger's
> surprising IRI compatibility meant there was easily available C code for
> doing this after all, but it seems not.
>
> So, while this is still very happy news, it's no rebuttal of the
> argument that switching to IRIs would make writing a solid server in C
> (or other languages without extensive and modern standard libraries, C
> is not really special here) into a considerably more difficult
> undertaking.
>
> Cheers,
> Solderpunk
I'll take a look at libcu as suggested. I think it's widely available
and certainly already there for most people because it must be a very
common dependency so I wouldn't considered it a bloat to use libcu.
If I get something done with libcu, I'll share it here if someone
is interested. For others languages, it would still be possible to
use ffi to call the C libicu into your favorite programming language.
Obviously, supporting IRI is far more complicated than answering to a
query containing special characters. That's why I asked on the mailing
list, I lack knowledge in this field and I couldn't imagine all cases.
More information about the Gemini
mailing list