diff --git a/examples/protocols/esp_http_client/esp_http_client_test.py b/examples/protocols/esp_http_client/esp_http_client_test.py index 303fd16e67..63e2cf8864 100644 --- a/examples/protocols/esp_http_client/esp_http_client_test.py +++ b/examples/protocols/esp_http_client/esp_http_client_test.py @@ -34,6 +34,9 @@ def test_examples_protocol_esp_http_client(env, extra_data): # content-len for chunked encoding is typically -1, could be a positive length in some cases dut1.expect(re.compile(r'HTTP Stream reader Status = 200, content_length = (\d)')) dut1.expect(re.compile(r'Last esp error code: 0x8001')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = (\d)')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = 10')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = 10')) dut1.expect('Finish http example') # test mbedtls dynamic resource @@ -60,6 +63,9 @@ def test_examples_protocol_esp_http_client(env, extra_data): # content-len for chunked encoding is typically -1, could be a positive length in some cases dut1.expect(re.compile(r'HTTP Stream reader Status = 200, content_length = (\d)')) dut1.expect(re.compile(r'Last esp error code: 0x8001')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = (\d)')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = 10')) + dut1.expect(re.compile(r'HTTP Status = 206, content_length = 10')) dut1.expect('Finish http example') diff --git a/examples/protocols/esp_http_client/main/esp_http_client_example.c b/examples/protocols/esp_http_client/main/esp_http_client_example.c index e9b2e3dd70..e838e189e1 100644 --- a/examples/protocols/esp_http_client/main/esp_http_client_example.c +++ b/examples/protocols/esp_http_client/main/esp_http_client_example.c @@ -645,8 +645,9 @@ static void http_native_request(void) static void http_partial_download(void) { esp_http_client_config_t config = { - .url = "http://jigsaw.w3.org/HTTP/TE/foo.txt", + .url = "https://dl.espressif.com/dl/esp-idf/ci/esp_http_client_demo.txt", .event_handler = _http_event_handler, + .crt_bundle_attach = esp_crt_bundle_attach, }; esp_http_client_handle_t client = esp_http_client_init(&config);