mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_http_client: fix redirect by resetting location before parsing
Closes #8563. Signed-off-by: Nicklas Frahm <nicklas.frahm@gmail.com>
This commit is contained in:
parent
b8050b365e
commit
9a7d85c09b
@ -520,6 +520,10 @@ static esp_err_t esp_http_client_prepare(esp_http_client_handle_t client)
|
||||
client->process_again = 0;
|
||||
client->response->data_process = 0;
|
||||
client->first_line_prepared = false;
|
||||
if (client->location != NULL) {
|
||||
free(client->location);
|
||||
client->location = NULL;
|
||||
}
|
||||
http_parser_init(client->parser, HTTP_RESPONSE);
|
||||
if (client->connection_info.username) {
|
||||
char *auth_response = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user