mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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).
This commit is contained in:
parent
9cdb9a80a7
commit
c296c9148f
1 changed files with 4 additions and 6 deletions
|
@ -1401,6 +1401,8 @@ static size_t php_cli_server_client_send_through(php_cli_server_client *client,
|
||||||
|
|
||||||
static void php_cli_server_client_populate_request_info(const php_cli_server_client *client, sapi_request_info *request_info) /* {{{ */
|
static void php_cli_server_client_populate_request_info(const php_cli_server_client *client, sapi_request_info *request_info) /* {{{ */
|
||||||
{
|
{
|
||||||
|
char **val;
|
||||||
|
|
||||||
request_info->request_method = php_http_method_str(client->request.request_method);
|
request_info->request_method = php_http_method_str(client->request.request_method);
|
||||||
request_info->proto_num = client->request.protocol_version;
|
request_info->proto_num = client->request.protocol_version;
|
||||||
request_info->request_uri = client->request.request_uri;
|
request_info->request_uri = client->request.request_uri;
|
||||||
|
@ -1408,12 +1410,8 @@ static void php_cli_server_client_populate_request_info(const php_cli_server_cli
|
||||||
request_info->query_string = client->request.query_string;
|
request_info->query_string = client->request.query_string;
|
||||||
request_info->post_data = client->request.content;
|
request_info->post_data = client->request.content;
|
||||||
request_info->content_length = request_info->post_data_length = client->request.content_len;
|
request_info->content_length = request_info->post_data_length = client->request.content_len;
|
||||||
{
|
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) {
|
||||||
char **val;
|
request_info->content_type = strtok(*val, delimiter);
|
||||||
const char delimiter[] = ";";
|
|
||||||
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) {
|
|
||||||
request_info->content_type = strtok(*val, delimiter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue