mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(esp_http_server): updated condition to verify http version
Closes https://github.com/espressif/esp-idf/issues/14723
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -83,7 +83,7 @@ static esp_err_t verify_url (http_parser *parser)
|
||||
ESP_LOGD(TAG, LOG_FMT("received URI = %s"), r->uri);
|
||||
|
||||
/* Make sure version is HTTP/1.1 */
|
||||
if ((parser->http_major != 1) && (parser->http_minor != 1)) {
|
||||
if (!((parser->http_major == 1) && (parser->http_minor == 1))) {
|
||||
ESP_LOGW(TAG, LOG_FMT("unsupported HTTP version = %d.%d"),
|
||||
parser->http_major, parser->http_minor);
|
||||
parser_data->error = HTTPD_505_VERSION_NOT_SUPPORTED;
|
||||
|
Reference in New Issue
Block a user