Check the right header for X-Requested-With
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 7 Aug 2011 07:02:39 +0000 (03:02 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 7 Aug 2011 07:02:39 +0000 (03:02 -0400)
http/output_filter.php

index 2d97bcf740fc63d6fb05796eefa4d15d17b0c8af..79031ce62ef7d025b3911a51d7a382c7429a014a 100644 (file)
@@ -104,7 +104,7 @@ class OutputFilter
     // heuristics.
 
     // If this was from an XHR, assume JSON.
-    if (!$type && isset($request->data['_SERVER']['X_REQUESTED_WITH']))
+    if (!$type && isset($request->data['_SERVER']['HTTP_X_REQUESTED_WITH']))
       $type = 'json';
 
     // Check if an Action specified an overriding response type.