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 @@ -565,7 +565,7 @@ typedef enum {
565
565
*/
566
566
HTTPD_501_METHOD_NOT_IMPLEMENTED ,
567
567
568
- /* When HTTP version is not 1.1 */
568
+ /* When HTTP version is not 1.1 or 1.0 */
569
569
HTTPD_505_VERSION_NOT_SUPPORTED ,
570
570
571
571
/* Returned when http_parser halts parsing due to incorrect
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ static esp_err_t verify_url (http_parser *parser)
89
89
strlcpy ((char * )r -> uri , at , (length + 1 ));
90
90
ESP_LOGD (TAG , LOG_FMT ("received URI = %s" ), r -> uri );
91
91
92
- /* Make sure version is HTTP/1.1 */
93
- if (!((parser -> http_major == 1 ) && (parser -> http_minor == 1 ))) {
92
+ /* Make sure version is HTTP/1.1 or HTTP/1.0 (legacy compliance purpose) */
93
+ if (!((parser -> http_major == 1 ) && (( parser -> http_minor == 0 ) || ( parser -> http_minor == 1 ) ))) {
94
94
ESP_LOGW (TAG , LOG_FMT ("unsupported HTTP version = %d.%d" ),
95
95
parser -> http_major , parser -> http_minor );
96
96
parser_data -> error = HTTPD_505_VERSION_NOT_SUPPORTED ;
You can’t perform that action at this time.
0 commit comments