examples/esp_http_client: Use dl.espressif.com URL for performing request with Range header

esp_http_client_test.py: Add check for range request log
This commit is contained in:
Shubham Kulkarni
2022-02-23 15:38:52 +05:30
parent 000d3823bb
commit 81f8dce34c
2 changed files with 8 additions and 1 deletions

View File

@@ -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')

View File

@@ -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);