Bug #69849 [Com]: Broken output of apache_request_headers

From: Date: Tue, 16 Jun 2015 12:51:02 +0000
Subject: Bug #69849 [Com]: Broken output of apache_request_headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193563@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69849&edit=1 ID: 69849 Comment by: kontakt at kukulich dot cz Reported by: kontakt at kukulich dot cz Summary: Broken output of apache_request_headers Status: Open Type: Bug Package: *Web Server problem Operating System: Windows7 PHP Version: 7.0.0alpha1 Block user comment: N Private report: N New Comment: Yes, you're right, it's CGI (php-cgi.exe). Previous Comments: ------------------------------------------------------------------------ [2015-06-16 12:42:33] laruence@php.net I don't remember we have apache_request_headers in FPM SAPI... are you meaing cgi? ------------------------------------------------------------------------ [2015-06-16 11:24:21] kontakt at kukulich dot cz Nginx/1.9.1 + PHP-FPM ------------------------------------------------------------------------ [2015-06-16 11:22:19] cmb@php.net I can't reproduce this behavior with the built-in webserver. Which Server API do you use (see phpinfo)? ------------------------------------------------------------------------ [2015-06-16 10:52:28] kontakt at kukulich dot cz Description: ------------ There is a bad character at the end of every key of the apache_request_headers output. Test script: --------------- <?php header('Content-Type: text/plain'); var_dump(apache_request_headers()); Expected result: ---------------- array(8) { ["Connection"]=> string(10) "keep-alive" ["Accept-Encoding"]=> string(13) "gzip, deflate" ["Accept-Language"]=> string(23) "cs,en-US;q=0.7,en;q=0.3" ["Accept"]=> string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" ["User-Agent"]=> string(72) "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" ["Host"]=> string(9) "localhost:81" ["Content-Length"]=> string(0) "" ["Content-Type"]=> string(0) "" } Actual result: -------------- array(8) { ["Connection�"]=> string(10) "keep-alive" ["Accept-Encoding�"]=> string(13) "gzip, deflate" ["Accept-Language�"]=> string(23) "cs,en-US;q=0.7,en;q=0.3" ["Accept�"]=> string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" ["User-Agent�"]=> string(72) "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" ["Host�"]=> string(12) "localhost:81" ["Content-Length�"]=> string(0) "" ["Content-Type�"]=> string(0) "" } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69849&edit=1

« previous php.bugs (#193563) next »