On Monday, 14 December 2020 at 21:59:02 UTC, tchaloupka wrote:
* arsd's cgi.d - I haven't expected it to be so much slower
than vibe-d parser, it's almost 3 times slower, but on the
other hand it's super simple idiomatic D (again doesn't check
or allow what RFC says it should and many tests will fail)
yeah, I think I actually wrote that about eight years ago and
then never revisited it.... actually git blame says "committed on
Mar 24, 2012" so almost nine! And indeed, that git blame shows
the bulk of it is still the initial commit, though a few
`toLower`s got changed to `asLowerCase` a few years ago... so it
used to be even worse! lol
But wanna see something that will make you cry?
https://github.com/adamdruppe/arsd/blob/master/http2.d#L1232
I have another http header parser!!! That's for my client, and as
you can see, it is... not great. The case-insensitivity for
example is a mega hack and I actually need to fix that eventually.
At least there's some support for line continuations there. I
don't remember if I ever actually tested that though, it seems
most clients and servers don't do that anyway.