Revert "Fix duplicate HTTP headers"
This reverts commit e265247f34572eedd087ee01c8e43bdab319b322.
Esse commit está contido em:
@@ -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]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário