Skip to content


Browse files Browse the repository at this point in the history
Take the last value for a fastcgi param if multiple values are provided
Summary: If a fastcgi param was provided multiple times in the one request, the first value would be used.  This will now take the last one, which is what PHP does.
Closes #2924

Reviewed By: @ptarjan

Differential Revision: D1381723

Pulled By: @JoelMarcey
  • Loading branch information
leev authored and facebook-github-bot committed Jun 13, 2014
1 parent 71a7e47 commit 80638d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hphp/runtime/server/fastcgi/fastcgi-transport.cpp
Expand Up @@ -366,7 +366,10 @@ void FastCGITransport::onHeader(std::unique_ptr<folly::IOBuf> key_chain,
cursor = Cursor(value_chain.get());
std::string value = cursor.readFixedString(
m_requestHeaders.emplace(key, value);
auto it = m_requestHeaders.emplace(key, value);
if (!it.second) {
it.first->second = value;

static const std::string
Expand Down

0 comments on commit 80638d7

Please sign in to comment.