Revert "Fix duplicate HTTP headers"

This reverts commit e265247f34572eedd087ee01c8e43bdab319b322.
Esse commit está contido em:
mwilliams
2013-07-10 10:53:10 -07:00
commit de Sara Golemon
commit 01b67654a6
2 arquivos alterados com 3 adições e 5 exclusões
+2 -3
Ver Arquivo
@@ -29,7 +29,6 @@
#include "hphp/runtime/base/server/replay_transport.h"
#include "hphp/runtime/base/server/virtual_host.h"
#include "hphp/runtime/base/util/http_client.h"
#include "folly/String.h"
#define DEFAULT_POST_CONTENT_TYPE "application/x-www-form-urlencoded"
@@ -282,10 +281,10 @@ void HttpProtocol::PrepareSystemVariables(Transport *transport,
}
}
{
for (unsigned int i = 0; i < values.size(); i++) {
String key = "HTTP_";
key += StringUtil::ToUpper(iter->first).replace("-", "_");
server.set(key, String(folly::join(", ", values)));
server.set(key, String(values[i]));
}
}
+1 -2
Ver Arquivo
@@ -20,7 +20,6 @@
#include "hphp/runtime/base/runtime_option.h"
#include "hphp/runtime/base/server/server_note.h"
#include "hphp/runtime/base/server/transport.h"
#include "folly/String.h"
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
@@ -46,7 +45,7 @@ Array f_apache_request_headers() {
for (HeaderMap::const_iterator iter = headers.begin();
iter != headers.end(); ++iter) {
const vector<string> &values = iter->second;
ret.set(String(iter->first), String(folly::join(", ", values)));
ret.set(String(iter->first), String(values.back()));
}
return ret;
}