getallheaders available for FASTCGI in PHP 5.4

Good news. PHP 5.4 – according to docs – will support the “apache alias” getallheaders().

That means, you can get all header values of the request w/o fiddling any longer with server configuration. N1.

Read On:
What new feature in PHP 5.4 is the most important to you?
Improved handling of HTTP requests in PHP

This entry was posted in Linked, PHP Development, Pressed and tagged , , , , , , , . Bookmark the permalink.

5 Responses to getallheaders available for FASTCGI in PHP 5.4

  1. Updated my post, thanks for the ping !

    • hakre says:

      Nicolas, I’ve been running a test if multiple, same-named request headers are concatenated (value 1, value 2) in PHP, PHP 5.3.8 did so in my FCGI setup. Do you know more if that is the default (by PHP?) or this is done with the SAPI implementation? (well I could look into PHP src as well but maybe you know ?)

      • I wouldn’t be surprised if the web server did the job. I’ll update my post to link to this part of the RFC, thanks for noticing!

        • hakre says:

          I *tried* to find something specific inside PHP src, but didn’t so far. I run over the question when looking in an answer I wrote about Accept-Language and wondered if normalization would have taken place or not. The PHP source has multiple implementations of SAPIs, I concentrated on CGI as I thought it might be most simple, but had no luck so far to find something useful.

  2. Pingback: Improved handling of HTTP requests in PHP | hakre on wordpress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s