diff options
author | Derick Rethans <github@derickrethans.nl> | 2012-08-24 10:56:03 +0200 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2012-08-24 10:56:03 +0200 |
commit | bc602495d7e15f3684aaff22b96e9dfb1122b424 (patch) | |
tree | a994c9f36fdb744dbd55058b41c827f7b1aaa04a /sapi/cli/php_cli_server.c | |
parent | de59314a60e6503550546f38fc6ebb141d2fbfdb (diff) | |
parent | 21f085720cbb8967d6f7826a18e2ce71b6f0e216 (diff) | |
download | php-git-bc602495d7e15f3684aaff22b96e9dfb1122b424.tar.gz |
Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
Diffstat (limited to 'sapi/cli/php_cli_server.c')
-rw-r--r-- | sapi/cli/php_cli_server.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 876c57a34d..e80ab68f80 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1618,7 +1618,11 @@ static int php_cli_server_client_read_request(php_cli_server_client *client, cha client->parser.data = client; nbytes_consumed = php_http_parser_execute(&client->parser, &settings, buf, nbytes_read); if (nbytes_consumed != nbytes_read) { - *errstr = estrdup("Malformed HTTP request"); + if (buf[0] & 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) { + *errstr = estrdup("Unsupported SSL request"); + } else { + *errstr = estrdup("Malformed HTTP request"); + } return -1; } if (client->current_header_name) { @@ -2403,7 +2407,7 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */ php_localtime_r(&tv.tv_sec, &tm); php_asctime_r(&tm, buf); printf("PHP %s Development Server started at %s" - "Listening on %s\n" + "Listening on http://%s\n" "Document root is %s\n" "Press Ctrl-C to quit.\n", PHP_VERSION, buf, server_bind_address, document_root); |