aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/http/response.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/http/response.cc')
-rw-r--r--libtransport/src/http/response.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libtransport/src/http/response.cc b/libtransport/src/http/response.cc
index 79550898b..727e2c755 100644
--- a/libtransport/src/http/response.cc
+++ b/libtransport/src/http/response.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Cisco and/or its affiliates.
+ * Copyright (c) 2021 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -98,7 +98,10 @@ std::size_t HTTPResponse::parseHeaders(const uint8_t *buffer, std::size_t size,
value_start++;
}
if (value_start < line.size()) {
- headers[line.substr(0, param_end)] =
+ auto header = line.substr(0, param_end);
+ std::transform(header.begin(), header.end(), header.begin(),
+ [](unsigned char c) { return std::tolower(c); });
+ headers[header] =
line.substr(value_start, line.size() - value_start - 1);
}
}