laruence Fri, 19 Aug 2011 08:30:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315162
Log: 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). Bugs: https://bugs.php.net/55450 (Assigned) Built in web server not accepting file uploads https://bugs.php.net/55121 (Re-Opened) Segfault with multipart/form-data POST / 404 request Changed paths: U php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c U php/php-src/trunk/sapi/cli/php_cli_server.c Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c =================================================================== --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-08-19 07:50:25 UTC (rev 315161) +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-08-19 08:30:26 UTC (rev 315162) @@ -1401,6 +1401,8 @@ 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,12 +1410,8 @@ 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); - } + if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) { + request_info->content_type = strtok(*val, delimiter); } } /* }}} */ Modified: php/php-src/trunk/sapi/cli/php_cli_server.c =================================================================== --- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-08-19 07:50:25 UTC (rev 315161) +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-08-19 08:30:26 UTC (rev 315162) @@ -1401,6 +1401,8 @@ 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,12 +1410,8 @@ 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); - } + if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) { + request_info->content_type = *val; } } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php