Open
Description
Description
The following code:
<?php
print_r($_SERVER);
Requested with:
curl -s -H 'X-Test: 1' -H 'X-%%Test%%: 1' 'http://127.0.0.1/' | grep 'HTTP_'
Resulted in this output:
[HTTP_X_TEST] => 1
[HTTP_ACCEPT] => */*
[HTTP_USER_AGENT] => curl/7.83.1
[HTTP_HOST] => 127.0.0.1
But I expected this output instead:
[HTTP_X_TEST] => 1
[HTTP_X_%%TEST%%] => 1
[HTTP_ACCEPT] => */*
[HTTP_USER_AGENT] => curl/7.83.1
[HTTP_HOST] => 127.0.0.1
This appears to be unique to CGI, or alternatively mod_php is immune.
PHP Version
PHP 8.1.26
Operating System
Alpine Linux 3.18