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:
Xinchen Hui 2011-08-19 08:30:26 +00:00
parent 9cdb9a80a7
commit c296c9148f

View file

@ -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) /* {{{ */
{
char **val;
request_info->request_method = php_http_method_str(client->request.request_method);
request_info->proto_num = client->request.protocol_version;
request_info->request_uri = client->request.request_uri;
@ -1408,13 +1410,9 @@ static void php_cli_server_client_populate_request_info(const php_cli_server_cli
request_info->query_string = client->request.query_string;
request_info->post_data = client->request.content;
request_info->content_length = request_info->post_data_length = client->request.content_len;
{
char **val;
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);
}
}
} /* }}} */
static void destroy_request_info(sapi_request_info *request_info) /* {{{ */