mirror of
https://github.com/lloeki/nanoserve.git
synced 2025-12-06 03:04:39 +01:00
Accept lowercase headers
This commit is contained in:
parent
e5a05299b1
commit
eea9588742
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ module NanoServe
|
||||||
def parse_header(str)
|
def parse_header(str)
|
||||||
(@sep = '' && return) if str == ''
|
(@sep = '' && return) if str == ''
|
||||||
|
|
||||||
unless (m = str.match(/(?<header>[A-Z][-A-Za-z]*):\s+(?<value>.+)$/))
|
unless (m = str.match(/(?<header>[A-Za-z][-A-Za-z]*):\s+(?<value>.+)$/))
|
||||||
raise RequestError, "cannot parse header: '#{str}'"
|
raise RequestError, "cannot parse header: '#{str}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue