From 8b01396eca562919444df40e0b1c0112342bbf31 Mon Sep 17 00:00:00 2001 From: Ned Wright Date: Sun, 30 Oct 2022 15:16:28 +0000 Subject: [PATCH] Use case insensitive comparison on rest connection header --- core/rest/rest_conn.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/rest/rest_conn.cc b/core/rest/rest_conn.cc index 914d127..8758227 100644 --- a/core/rest/rest_conn.cc +++ b/core/rest/rest_conn.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include "debug.h" @@ -68,7 +69,7 @@ RestConn::parseConn() const os.str(line); string head, data; os >> head >> data; - if (head == "Content-Length:" || head == "content-length:") { + if (boost::iequals(head, "Content-Length:")) { try { len = stoi(data, nullptr); } catch (...) {