From 998f732b24ce3bfbeb29c779b2a120c69414144a Mon Sep 17 00:00:00 2001 From: Dan Schatzberg Date: Thu, 4 Jun 2015 20:07:58 +0000 Subject: [PATCH] Fix incorrect length calculation Set request lengths were being calculated using the header data (which is in network order). --- Protocol.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Protocol.cc b/Protocol.cc index 16005ad..6d346b8 100644 --- a/Protocol.cc +++ b/Protocol.cc @@ -160,7 +160,7 @@ int ProtocolBinary::set_request(const char* key, const char* value, int len) { bufferevent_write(bev, &h, 32); // With extras bufferevent_write(bev, key, keylen); bufferevent_write(bev, value, len); - return 24 + h.body_len; + return 24 + ntohl(h.body_len); } /**