mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Improve error message for ssl request
This commit is contained in:
parent
fd50bf2085
commit
a88eca53f7
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue