mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
parsers: http_upload: allow any case header
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
9b6fcd1bd7
commit
dc6dd19a44
1 changed files with 4 additions and 4 deletions
|
@ -50,10 +50,10 @@ impl TryFrom<Element> for Header {
|
|||
let name: String = get_attr!(elem, "name", Required);
|
||||
let text = String::from(elem.text());
|
||||
|
||||
Ok(match name.as_str() {
|
||||
"Authorization" => Header::Authorization(text),
|
||||
"Cookie" => Header::Cookie(text),
|
||||
"Expires" => Header::Expires(text),
|
||||
Ok(match name.to_lowercase().as_str() {
|
||||
"authorization" => Header::Authorization(text),
|
||||
"cookie" => Header::Cookie(text),
|
||||
"expires" => Header::Expires(text),
|
||||
_ => {
|
||||
return Err(Error::ParseError(
|
||||
"Header name must be either 'Authorization', 'Cookie', or 'Expires'.",
|
||||
|
|
Loading…
Reference in a new issue