File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
components/esp_https_ota/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,14 @@ static bool process_again(int status_code)
103103static esp_err_t _http_handle_response_code (esp_https_ota_t * https_ota_handle , int status_code )
104104{
105105 esp_err_t err = ESP_FAIL ;
106- if (redirection_required (status_code )) {
106+ if (https_ota_handle -> binary_file_len > 0
107+ #if CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD
108+ && !https_ota_handle -> partial_http_download
109+ #endif
110+ && status_code != HttpStatus_PartialContent ) {
111+ ESP_LOGE (TAG , "Requested range header ignored by server" );
112+ return ESP_ERR_HTTP_RANGE_NOT_SATISFIABLE ;
113+ } else if (redirection_required (status_code )) {
107114 err = esp_http_client_set_redirection (https_ota_handle -> http_client );
108115 if (err != ESP_OK ) {
109116 ESP_LOGE (TAG , "URL redirection Failed" );
You can’t perform that action at this time.
0 commit comments