mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
ParseHttpHeaders: Make case-insensitive per HTTP spec.
This commit is contained in:
@@ -106,9 +106,9 @@ bool ParseHttpHeaders(raw_istream& is, llvm::SmallVectorImpl<char>* contentType,
|
||||
llvm::StringRef field;
|
||||
std::tie(field, line) = line.split(':');
|
||||
field = field.rtrim();
|
||||
if (field == "Content-Type")
|
||||
if (field.equals_lower("content-type"))
|
||||
inContentType = true;
|
||||
else if (field == "Content-Length")
|
||||
else if (field.equals_lower("content-length"))
|
||||
inContentLength = true;
|
||||
else
|
||||
continue; // ignore other fields
|
||||
|
||||
Reference in New Issue
Block a user