thrift: support maximum frame size in
---------------------------------------
Key: THRIFT-1337
URL: https://issues.apache.org/jira/browse/THRIFT-1337
Project: Thrift
Issue Type: Improvement
Components: C++ - Library
Reporter: Dave Watson
Priority: Minor
Attachments:
0033-thrift-support-maximum-frame-size-in-TNonblockingSer.patch
>From 0dc0b12d1b00f9036407283315e9019a1f9f3b58 Mon Sep 17 00:00:00 2001
From: Adam Simpkins <[email protected]>
Date: Mon, 26 Apr 2010 19:47:59 +0000
Subject: [PATCH 33/33] thrift: support maximum frame size in
TNonblockingServer
Summary:
This prevents the C++ TNonblockingServer from trying to allocate a giant
buffer when a client sends a huge frame size. Usually if this occurs,
if is because a client is simply sending garbage data to the server.
For now, it defaults to 256MB. Hopefully this value is large enough not
to cause problems for legitimate service requests. Services that do
actually have messages larger than this value will need to update their
code to set a larger value than the default.
Test Plan:
Ran the tests in thrift/lib/cpp/processor/test.
Also ran thrift/lib/cpp/server/test/TNonblockingServerTest.cpp,
and tested sending garbage frame sizes to it.
Revert Plan:
OK
---
lib/cpp/src/server/TNonblockingServer.cpp | 14 +++++++++++---
lib/cpp/src/server/TNonblockingServer.h | 28 ++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira