1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add request_parse_body() function

RFC: https://wiki.php.net/rfc/rfc1867-non-post

This function allows populating the $_POST and $_FILES globals for non-post
requests. This avoids manual parsing of RFC1867 requests.

Fixes #55815
Closes GH-11472
This commit is contained in:
Ilija Tovilo
2023-06-17 22:26:21 +02:00
parent 2f894389b6
commit cd66fcc68b
41 changed files with 995 additions and 45 deletions

View File

@@ -2324,7 +2324,9 @@ TEST $file
}
$env['CONTENT_LENGTH'] = strlen($request);
$env['REQUEST_METHOD'] = 'POST';
if (empty($env['REQUEST_METHOD'])) {
$env['REQUEST_METHOD'] = 'POST';
}
if (empty($request)) {
$junit->markTestAs('BORK', $shortname, $tested, null, 'empty $request');