mirror of
https://github.com/openappsec/openappsec.git
synced 2025-06-28 16:41:02 +03:00
Use case insensitive comparison on rest connection header
This commit is contained in:
parent
a8de95a313
commit
8b01396eca
@ -16,6 +16,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ RestConn::parseConn() const
|
|||||||
os.str(line);
|
os.str(line);
|
||||||
string head, data;
|
string head, data;
|
||||||
os >> head >> data;
|
os >> head >> data;
|
||||||
if (head == "Content-Length:" || head == "content-length:") {
|
if (boost::iequals(head, "Content-Length:")) {
|
||||||
try {
|
try {
|
||||||
len = stoi(data, nullptr);
|
len = stoi(data, nullptr);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user