mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
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:
@@ -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
|
# 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'HTTP Stream reader Status = 200, content_length = (\d)'))
|
||||||
dut1.expect(re.compile(r'Last esp error code: 0x8001'))
|
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')
|
dut1.expect('Finish http example')
|
||||||
|
|
||||||
# test mbedtls dynamic resource
|
# 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
|
# 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'HTTP Stream reader Status = 200, content_length = (\d)'))
|
||||||
dut1.expect(re.compile(r'Last esp error code: 0x8001'))
|
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')
|
dut1.expect('Finish http example')
|
||||||
|
|
||||||
|
|
||||||
|
@@ -645,8 +645,9 @@ static void http_native_request(void)
|
|||||||
static void http_partial_download(void)
|
static void http_partial_download(void)
|
||||||
{
|
{
|
||||||
esp_http_client_config_t config = {
|
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,
|
.event_handler = _http_event_handler,
|
||||||
|
.crt_bundle_attach = esp_crt_bundle_attach,
|
||||||
};
|
};
|
||||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user