aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_connection.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-12-12 01:48:56 +0900
committeripknHama <ipknhama@gmail.com>2014-12-12 01:48:56 +0900
commitad654da7115353baef19a4c87f53d4b88c02d4e5 (patch)
tree27b86384181a400863580dab1b719ca3b01d2a91 /include/http_connection.h
parent21b027774e4c472d27d8726774aad1aaed95ea42 (diff)
parent966867a9ca8ca3dd9e783d628b8184563318d03c (diff)
downloadcrow-ad654da7115353baef19a4c87f53d4b88c02d4e5.tar.gz
crow-ad654da7115353baef19a4c87f53d4b88c02d4e5.zip
Merge branch 'acron0-get-middleware2'
Diffstat (limited to 'include/http_connection.h')
-rw-r--r--include/http_connection.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/http_connection.h b/include/http_connection.h
index d88bc25..db069c3 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -113,7 +113,7 @@ namespace crow
boost::asio::io_service& io_service,
Handler* handler,
const std::string& server_name,
- std::tuple<Middlewares...>& middlewares
+ std::tuple<Middlewares...>* middlewares
)
: socket_(io_service),
handler_(handler),
@@ -210,7 +210,7 @@ namespace crow
ctx_ = detail::context<Middlewares...>();
req.middleware_context = (void*)&ctx_;
- detail::middleware_call_helper<0, decltype(ctx_), decltype(middlewares_), Middlewares...>(middlewares_, req, res, ctx_);
+ detail::middleware_call_helper<0, decltype(ctx_), decltype(*middlewares_), Middlewares...>(*middlewares_, req, res, ctx_);
if (!res.completed_)
{
@@ -243,8 +243,8 @@ namespace crow
detail::after_handlers_call_helper<
((int)sizeof...(Middlewares)-1),
decltype(ctx_),
- decltype(middlewares_)>
- (middlewares_, ctx_, req_, res);
+ decltype(*middlewares_)>
+ (*middlewares_, ctx_, req_, res);
}
//auto self = this->shared_from_this();
@@ -491,7 +491,7 @@ namespace crow
bool need_to_start_read_after_complete_{};
bool add_keep_alive_{};
- std::tuple<Middlewares...>& middlewares_;
+ std::tuple<Middlewares...>* middlewares_;
detail::context<Middlewares...> ctx_;
};