Skip to content

Commit b3e359d

Browse files
Sotirios Delimanolismeta-codesync[bot]
authored andcommitted
Clean up Thrift flag gating size limit on uexw header
Reviewed By: sazonovkirill Differential Revision: D94910308 fbshipit-source-id: 32f3be42be73f1b9fa54306d435ca00211a59042
1 parent c2b5556 commit b3e359d

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

third-party/thrift/src/thrift/lib/cpp2/GeneratedCodeHelper.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ using namespace std;
3535
using namespace folly;
3636
using namespace apache::thrift::transport;
3737

38-
THRIFT_FLAG_DEFINE_bool(enforce_uexw_header_length, false);
39-
4038
namespace apache::thrift {
4139

4240
namespace detail {
@@ -280,8 +278,6 @@ folly::exception_wrapper create_app_exn_bad_interaction_state(
280278

281279
namespace {
282280

283-
constexpr size_t kMaxUexwSize = 1024;
284-
285281
void setUserExceptionHeader(
286282
Cpp2RequestContext& ctx,
287283
std::string exType,
@@ -297,14 +293,7 @@ void setUserExceptionHeader(
297293
}
298294

299295
header->setHeader(std::string(detail::kHeaderUex), std::move(exType));
300-
if (THRIFT_FLAG(enforce_uexw_header_length)) {
301-
header->setHeader(
302-
std::string(detail::kHeaderUexw),
303-
exReason.size() > kMaxUexwSize ? exReason.substr(0, kMaxUexwSize)
304-
: std::move(exReason));
305-
} else {
306-
header->setHeader(std::string(detail::kHeaderUexw), std::move(exReason));
307-
}
296+
header->setHeader(std::string(detail::kHeaderUexw), std::move(exReason));
308297
}
309298

310299
} // namespace

0 commit comments

Comments
 (0)