mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX RestfulService header parsing now accepts non-title case headers
This commit is contained in:
parent
378d829e8f
commit
ddd6a15b4a
@ -352,7 +352,7 @@ class RestfulService extends ViewableData {
|
|||||||
$match[1] = preg_replace_callback(
|
$match[1] = preg_replace_callback(
|
||||||
'/(?<=^|[\x09\x20\x2D])./',
|
'/(?<=^|[\x09\x20\x2D])./',
|
||||||
create_function('$matches', 'return strtoupper($matches[0]);'),
|
create_function('$matches', 'return strtoupper($matches[0]);'),
|
||||||
strtolower(trim($match[1]))
|
trim($match[1])
|
||||||
);
|
);
|
||||||
if( isset($headers[$match[1]]) ) {
|
if( isset($headers[$match[1]]) ) {
|
||||||
if (!is_array($headers[$match[1]])) {
|
if (!is_array($headers[$match[1]])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user