Skip to content

Instantly share code, notes, and snippets.

View sibidharan's full-sized avatar

Sibidharan sibidharan

View GitHub Profile
@rmpel
rmpel / apache_request_headers.php
Last active June 11, 2022 09:30
apache_request_headers drop-in function for PHP as FPM
<?php
// Drop-in replacement for apache_request_headers() when it's not available
if ( ! function_exists( 'apache_request_headers' ) ) {
function apache_request_headers() {
static $arrHttpHeaders;
if ( ! $arrHttpHeaders ) {
// Based on: http://www.iana.org/assignments/message-headers/message-headers.xml#perm-headers
$arrCasedHeaders = array(