Commit 9b271601 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

HttpServer: Fix left_connhd_len_ is not updated

parent 32bd1425
......@@ -271,6 +271,7 @@ void connhd_readcb(bufferevent *bev, void *ptr)
return;
}
leftlen -= readlen;
handler->set_left_connhd_len(leftlen);
if(leftlen == 0) {
bufferevent_setcb(bev, readcb, writecb, eventcb, ptr);
// Run on_read to process data left in buffer since they are not
......@@ -507,6 +508,11 @@ size_t Http2Handler::get_left_connhd_len() const
return left_connhd_len_;
}
void Http2Handler::set_left_connhd_len(size_t left)
{
left_connhd_len_ = left;
}
namespace {
ssize_t hd_send_callback(nghttp2_session *session,
const uint8_t *data, size_t len, int flags,
......
......@@ -111,6 +111,7 @@ public:
Sessions* get_sessions() const;
const Config* get_config() const;
size_t get_left_connhd_len() const;
void set_left_connhd_len(size_t left);
private:
nghttp2_session *session_;
Sessions *sessions_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment