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 {
569569 */
570570 HTTPD_501_METHOD_NOT_IMPLEMENTED ,
571571
572- /* When HTTP version is not 1.1 */
572+ /* When HTTP version is not 1.1 or 1.0 */
573573 HTTPD_505_VERSION_NOT_SUPPORTED ,
574574
575575 /* 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)
8585 strlcpy ((char * )r -> uri , at , (length + 1 ));
8686 ESP_LOGD (TAG , LOG_FMT ("received URI = %s" ), r -> uri );
8787
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 ) ))) {
9090 ESP_LOGW (TAG , LOG_FMT ("unsupported HTTP version = %d.%d" ),
9191 parser -> http_major , parser -> http_minor );
9292 parser_data -> error = HTTPD_505_VERSION_NOT_SUPPORTED ;
You can’t perform that action at this time.
0 commit comments