Skip to content

Instantly share code, notes, and snippets.

@whisher
Created June 10, 2013 08:53
Show Gist options
  • Save whisher/5747360 to your computer and use it in GitHub Desktop.
Save whisher/5747360 to your computer and use it in GitHub Desktop.
in the reference
http://framework.zend.com/manual/1.12/en/zend.test.phpunit.html
is:
$this->request->setHeader('X-Requested-With', 'XmlHttpRequest');
it should be:
$this->request->setHeader('X_REQUESTED_WITH', 'XMLHttpRequest');
in Zend_Controller_Request_Http
public function isXmlHttpRequest()
{
return ($this->getHeader('X_REQUESTED_WITH') == 'XMLHttpRequest');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment