--- tests/Zend/Controller/Request/HttpTest.php (revision 23226) +++ tests/Zend/Controller/Request/HttpTest.php (working copy) @@ -839,6 +839,16 @@ $pathInfo = $request->getPathInfo(); $this->assertEquals('/index/index', $pathInfo); } + + /** + * @group ZF-10577 + */ + public function testGetHeaderWithEmptyValueReturnsEmptyString() + { + $_SERVER['HTTP_X_FOO'] = ''; + + $this->assertSame('', $this->_request->getHeader('X-Foo')); + } } // Call Zend_Controller_Request_HttpTest::main() if this source file is executed directly. Index: tests/Zend/Paginator/_files/test.sqlite =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: library/Zend/Controller/Request/Http.php =================================================================== --- library/Zend/Controller/Request/Http.php (revision 23226) +++ library/Zend/Controller/Request/Http.php (working copy) @@ -979,7 +979,7 @@ // Try to get it from the $_SERVER array first $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header)); - if (!empty($_SERVER[$temp])) { + if (isset($_SERVER[$temp])) { return $_SERVER[$temp]; } @@ -987,7 +987,7 @@ // Apache if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); - if (!empty($headers[$header])) { + if (isset($headers[$header])) { return $headers[$header]; } $header = strtolower($header);