mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
Add some tests to httpcore related to #5344.
This commit is contained in:
@@ -312,3 +312,10 @@ when isMainModule:
|
||||
test.add("Connection", "Test")
|
||||
doAssert test["Connection", 2] == "Test"
|
||||
doAssert "upgrade" in test["Connection"]
|
||||
|
||||
# Bug #5344.
|
||||
doAssert parseHeader("foobar: ") == ("foobar", @[""])
|
||||
let (key, value) = parseHeader("foobar: ")
|
||||
test = newHttpHeaders()
|
||||
test[key] = value
|
||||
doAssert test["foobar"] == ""
|
||||
Reference in New Issue
Block a user