Skip to content

Commit

Permalink
FastCGI had a bug where as if the FCGI_STDIN packet was split into two
Browse files Browse the repository at this point in the history
Summary: records it would only accept the first one therefore truncating the body.

I'm not sure if this is the correct thing to do but as the string was
getting read from the chain already I suspect this is what was meant
to happen to begin with.
Closes #2933

Reviewed By: @ptarjan

Differential Revision: D1382263

Pulled By: @JoelMarcey
  • Loading branch information
Antony Puckey authored and facebook-github-bot committed Jun 13, 2014
1 parent 9c277a6 commit 71a7e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hphp/runtime/server/fastcgi/fastcgi-transport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void FastCGITransport::onBody(std::unique_ptr<folly::IOBuf> chain) {
size_t length = chain->computeChainDataLength();
std::string s = cursor.readFixedString(length);
m_monitor.lock();
m_bodyQueue.append(std::move(chain));
m_bodyQueue.append(s);
if (m_waiting > 0) {
m_monitor.notify();
}
Expand Down

0 comments on commit 71a7e47

Please sign in to comment.