]> granicus.if.org Git - php/commitdiff
Fix #55121 Segfault with multipart/form-data POST
authorFlorian Anderiasch <fa@php.net>
Mon, 25 Jul 2011 16:45:39 +0000 (16:45 +0000)
committerFlorian Anderiasch <fa@php.net>
Mon, 25 Jul 2011 16:45:39 +0000 (16:45 +0000)
sapi/cli/php_cli_server.c

index 7b549cea7e1f56324a98f1ce172a6f23cc14f3b0..0c5fb9cd1f691f0f4d8e3326d63ea6663a610617 100644 (file)
@@ -1409,8 +1409,9 @@ static void php_cli_server_client_populate_request_info(const php_cli_server_cli
        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 = *val;
+                       request_info->content_type = strtok(*val, delimiter);
                }
        }
 } /* }}} */