Closed xiruilin closed 4 years ago
@xiruilin Thanks for reporting, we would look into. Thanks.
Hi @xiruilin ,
The first question seems to be solved in bfc37ab43f1509df6331781e935af09b6e1ae65c. Could you have a try?
@xiruilin For the transport_ssl
change suggested above, do you have test case or code snippet which fails to work without this?
@ginkgm The first problem has been solved, thanks!
@xiruilin Glad to hear the first issue has been resolved, how about the second issue? For the transport_ssl change suggested above, do you have test case or code snippet which fails to work without this? Thanks.
@Alvin1Zhang @mahavirj
Sorry for my late answer.
The second issue occurred on an asynchronous connection, if not reset
ssl->conn_state
to TRANS_SSL_INIT
in ssl_close()
,
esp_http_client_set_redirection()
would got the issue.
In file "/esp-idf/components/tcp_transport/transport_ssl.c" lines 48,
function ssl_connect_async()
check the ssl->conn_state
.
Environment
Problem Description
1. In
esp_flash_api.c
lines 501, functionesp_flash_read()
, if read length too big, thenlength_to_allocate = MAX(MAX_READ_CHUNK, length)
will cause memory allocation to fail. In lines 519,length_to_read = MIN(MAX_READ_CHUNK, length)
, so it can be modified as follows:2. In
transport_ssl.c
lines 168, functionssl_close()
, if https request got 301 or 302 status code, need to redirect, the ssl state must be reset to origin, changed below:Thanks!