aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_connection.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-09-11 06:32:41 +0900
committeripknHama <ipknhama@gmail.com>2014-09-11 06:32:41 +0900
commit9eb96b7f4c2e134e768555de2650823a863843ce (patch)
tree87797876b1a8bdf12f11d31e2fa28fc462075610 /include/http_connection.h
parentab1063c046b363a37ccaf91c7dfb1fecd279be36 (diff)
downloadcrow-9eb96b7f4c2e134e768555de2650823a863843ce.tar.gz
crow-9eb96b7f4c2e134e768555de2650823a863843ce.zip
Implement example CookieParser middleware and test
Diffstat (limited to 'include/http_connection.h')
-rw-r--r--include/http_connection.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/http_connection.h b/include/http_connection.h
index 3a9fe65..54d0860 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -155,7 +155,7 @@ namespace crow
void handle_header()
{
// HTTP 1.1 Expect: 100-continue
- if (parser_.check_version(1, 1) && parser_.headers.count("expect") && parser_.headers["expect"] == "100-continue")
+ if (parser_.check_version(1, 1) && parser_.headers.count("expect") && get_header_value(parser_.headers, "expect") == "100-continue")
{
buffers_.clear();
static std::string expect_100_continue = "HTTP/1.1 100 Continue\r\n\r\n";
@@ -174,13 +174,13 @@ namespace crow
if (parser_.check_version(1, 0))
{
// HTTP/1.0
- if (!(req.headers.count("connection") && boost::iequals(req.headers["connection"],"Keep-Alive")))
+ if (!(req.headers.count("connection") && boost::iequals(req.get_header_value("connection"),"Keep-Alive")))
close_connection_ = true;
}
else if (parser_.check_version(1, 1))
{
// HTTP/1.1
- if (req.headers.count("connection") && req.headers["connection"] == "close")
+ if (req.headers.count("connection") && req.get_header_value("connection") == "close")
close_connection_ = true;
if (!req.headers.count("host"))
{