Github user djwatson commented on a diff in the pull request: https://github.com/apache/thrift/pull/357#discussion_r23559637 --- Diff: lib/cpp/src/thrift/server/TNonblockingServer.cpp --- @@ -547,12 +553,18 @@ void TNonblockingServer::TConnection::transition() { case APP_READ_REQUEST: // We are done reading the request, package the read buffer into transport // and get back some data from the dispatch function - inputTransport_->resetBuffer(readBuffer_, readBufferPos_); - outputTransport_->resetBuffer(); - // Prepend four bytes of blank space to the buffer so we can - // write the frame size there later. - outputTransport_->getWritePtr(4); - outputTransport_->wroteBytes(4); + if (!server_->getOutputProtocolFactory()) { + inputTransport_->resetBuffer(readBuffer_, readBufferPos_); + outputTransport_->resetBuffer(); + } else { + inputTransport_->resetBuffer(readBuffer_ + 4, readBufferPos_ - 4); --- End diff -- THeader expects the first four bytes of framing to still be in the message. Nonblocking server previously always stripped it off
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---