Skip to content

Commit 7790c4d

Browse files
committed
Fixed #55450 (Built in web server not accepting file uploads), which might break #55121 fixing(r313677)
Reopened #55121 to let somebody redone the fixing(as I can't reproduce 55121 in redhat 64-bit).
1 parent 2ebe379 commit 7790c4d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

sapi/cli/php_cli_server.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,19 +1401,17 @@ static size_t php_cli_server_client_send_through(php_cli_server_client *client,
14011401

14021402
static void php_cli_server_client_populate_request_info(const php_cli_server_client *client, sapi_request_info *request_info) /* {{{ */
14031403
{
1404+
char **val;
1405+
14041406
request_info->request_method = php_http_method_str(client->request.request_method);
14051407
request_info->proto_num = client->request.protocol_version;
14061408
request_info->request_uri = client->request.request_uri;
14071409
request_info->path_translated = client->request.path_translated;
14081410
request_info->query_string = client->request.query_string;
14091411
request_info->post_data = client->request.content;
14101412
request_info->content_length = request_info->post_data_length = client->request.content_len;
1411-
{
1412-
char **val;
1413-
const char delimiter[] = ";";
1414-
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) {
1415-
request_info->content_type = strtok(*val, delimiter);
1416-
}
1413+
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) {
1414+
request_info->content_type = *val;
14171415
}
14181416
} /* }}} */
14191417

0 commit comments

Comments
 (0)