Page MenuHomePhorge

D25743.1734630418.diff
No OneTemporary

D25743.1734630418.diff

diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php
--- a/src/aphront/AphrontRequest.php
+++ b/src/aphront/AphrontRequest.php
@@ -892,7 +892,6 @@
}
$headers = array();
- $seen = array();
// NOTE: apache_request_headers() might provide a nicer way to do this,
// but isn't available under FCGI until PHP 5.4.0.
@@ -918,30 +917,14 @@
if ($should_forward) {
$headers[] = array($key, $value);
- $seen[$key] = true;
}
}
// In some situations, this may not be mapped into the HTTP_X constants.
// CONTENT_LENGTH is similarly affected, but we trust cURL to take care
// of that if it matters, since we're handing off a request body.
- if (empty($seen['Content-Type'])) {
- if (isset($_SERVER['CONTENT_TYPE'])) {
- $headers[] = array('Content-Type', $_SERVER['CONTENT_TYPE']);
- }
- }
-
- foreach ($headers as $header) {
- list($key, $value) = $header;
- switch ($key) {
- case 'Host':
- case 'Authorization':
- // Don't forward these headers, we've already handled them elsewhere.
- unset($headers[$key]);
- break;
- default:
- break;
- }
+ if (isset($_SERVER['CONTENT_TYPE'])) {
+ $headers[] = array('Content-Type', $_SERVER['CONTENT_TYPE']);
}
foreach ($headers as $header) {

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 17:46 (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015221
Default Alt Text
D25743.1734630418.diff (1 KB)

Event Timeline