Skip to content

Commit fd534dd

Browse files
Fix bug in http message body extraction
1 parent c82e52f commit fd534dd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

presto-native-execution/presto_cpp/main/TaskResource.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,13 @@ proxygen::RequestHandler* TaskResource::createOrUpdateTaskImpl(
231231
std::shared_ptr<http::CallbackRequestHandlerState> handlerState) {
232232
folly::via(
233233
httpSrvCpuExecutor_,
234-
[this, &body, taskId, summarize, createOrUpdateFunc, receiveThrift]() {
234+
[this,
235+
requestBody = util::extractMessageBody(body),
236+
taskId,
237+
summarize,
238+
createOrUpdateFunc,
239+
receiveThrift]() {
235240
const auto startProcessCpuTimeNs = util::getProcessCpuTimeNs();
236-
std::string requestBody = util::extractMessageBody(body);
237241

238242
std::unique_ptr<protocol::TaskInfo> taskInfo;
239243
try {

0 commit comments

Comments
 (0)