summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorYardanico <tiberiumk12@gmail.com>2023-11-01 10:01:31 +0300
committerGitHub <noreply@github.com>2023-11-01 08:01:31 +0100
commit40e33dec45b98e1c5385f844e241011a8351d364 (patch)
tree8048a700248b13f2a126d6b750db15a4d69bd88d /tests
parent92141e82ede93028be5781d6f4e906cefa3b03eb (diff)
downloadNim-40e33dec45b98e1c5385f844e241011a8351d364.tar.gz
Fix `IndexDefect` errors in httpclient on invalid/weird headers (#22886)
Continuation of https://github.com/nim-lang/Nim/pull/19262

Fixes https://github.com/nim-lang/Nim/issues/19261

The parsing code is still too lenient (e.g. it will happily parse header
names with spaces in them, which is outright invalid by the spec), but I
didn't want to touch it beyond the simple changes to make sure that
`std/httpclient` won't throw `IndexDefect`s like it does now on those
cases:
- Multiline header values
- No colon after the header name
- No value after the header name + colon

One question remains - should I keep `toCaseInsensitive` exported in
`httpcore` or just copy-paste the implementation?

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions