diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php
index 452dcb047..307066299 100644
--- a/lib/Cake/Network/CakeRequest.php
+++ b/lib/Cake/Network/CakeRequest.php
@@ -503,7 +503,7 @@ class CakeRequest implements ArrayAccess {
 		if (isset($detect['env']) && $this->_environmentDetector($detect)) {
 			return true;
 		}
-		if (isset($detect['header']) && $this->_environmentDetector($detect)) {
+		if (isset($detect['header']) && $this->_headerDetector($detect)) {
 			return true;
 		}
 		if (isset($detect['param']) && $this->_paramDetector($detect)) {
diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php
index 99d51c8ac..14a3d63f4 100644
--- a/lib/Cake/Test/Case/Network/CakeRequestTest.php
+++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -106,7 +106,7 @@ class CakeRequestTest extends CakeTestCase {
  */
 	public function testHeaderDetector() {
 		$request = $this->getMock('TestCakeRequest', array('getAcceptHeaders'));
-		$_SERVER['HTTP_ACCEPT'] = 'application/json';
+		$_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, */*';
 		$detector = array('header' => array('application/json'), 'param' => 'ext', 'value' => 'json');
 		$request->expects($this->once())
 			->method('getAcceptHeaders')
@@ -776,6 +776,24 @@ class CakeRequestTest extends CakeTestCase {
 		$this->assertFalse($request->is('delete'));
 	}
 
+/**
+ * Test is() with json and xml.
+ *
+ * @return void
+ */
+	public function testIsJsonAndXml() {
+		$request = new CakeRequest('some/path');
+
+		$_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, */*';
+		$this->assertTrue($request->is(array('json')));
+
+		$_SERVER['HTTP_ACCEPT'] = 'application/xml, text/plain, */*';
+		$this->assertTrue($request->is(array('xml')));
+
+		$_SERVER['HTTP_ACCEPT'] = 'text/xml, */*';
+		$this->assertTrue($request->is(array('xml')));
+	}
+
 /**
  * Test is() with multiple types.
  *