Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2680879
D25743.1734630418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25743.1734630418.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25743: Fix stripping headers from proxy requests to other cluster nodes
Attached
Detach File
Event Timeline
Log In to Comment