Skip to content

Commit a30e67a

Browse files
authored
Fix overly aggressive header check. Fixes #1235 (#1236)
1 parent d2de734 commit a30e67a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Messages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function mkheaders(h, headers=Vector{Header}(undef, length(h)))::Headers
211211
length(head) != 2 && throw(ArgumentError("invalid header key-value pair: $head"))
212212
key = SubString(string(head[1]))
213213
value = SubString(string(head[2]))
214-
if !occursin(r"^[!#$%&'*+\-.^_`|~[:alnum:]]+$", key) || !occursin(r"^[!-~]+$", value)
214+
if !occursin(r"^[!#$%&'*+\-.^_`|~[:alnum:]]+$", key) || !occursin(r"^[\t !-~\x80-\xff]*$", value)
215215
throw(ArgumentError("Invalid header key or value"))
216216
end
217217
headers[i] = key => value

0 commit comments

Comments
 (0)