File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
components/esp_http_server Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ typedef enum {
569
569
*/
570
570
HTTPD_501_METHOD_NOT_IMPLEMENTED ,
571
571
572
- /* When HTTP version is not 1.1 */
572
+ /* When HTTP version is not 1.1 or 1.0 */
573
573
HTTPD_505_VERSION_NOT_SUPPORTED ,
574
574
575
575
/* Returned when http_parser halts parsing due to incorrect
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ static esp_err_t verify_url (http_parser *parser)
85
85
strlcpy ((char * )r -> uri , at , (length + 1 ));
86
86
ESP_LOGD (TAG , LOG_FMT ("received URI = %s" ), r -> uri );
87
87
88
- /* Make sure version is HTTP/1.1 */
89
- if (!((parser -> http_major == 1 ) && (parser -> http_minor == 1 ))) {
88
+ /* Make sure version is HTTP/1.1 or HTTP/1.0 (legacy compliance purpose) */
89
+ if (!((parser -> http_major == 1 ) && (( parser -> http_minor == 0 ) || ( parser -> http_minor == 1 ) ))) {
90
90
ESP_LOGW (TAG , LOG_FMT ("unsupported HTTP version = %d.%d" ),
91
91
parser -> http_major , parser -> http_minor );
92
92
parser_data -> error = HTTPD_505_VERSION_NOT_SUPPORTED ;
You can’t perform that action at this time.
0 commit comments