ESP HTTP Client: disable_auto_redirect causes infinite loop (IDFGH-9243) #10629
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.0
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
XIAO_ESP32C3
Power Supply used.
USB
What is the expected behavior?
When using
.disable_auto_redirect = true
, I'd expect the HTTP request to end when it get's to a redirect. At that point, the firmware can manually get thelocation
header and decide what to do with the redirect or handle it in the event handler.What is the actual behavior?
The HTTP client goes into an infinite loop until
redirect_counter
reaches the maximum count.This is caused by the following lines of code:
The block of code prevents the redirect from happening, but then sets
process_again
to1
, which causes the response to be processed again.I believe the solution should be to put the
redirect_counter
andprocess_again
assignments in theelse
statement.Steps to reproduce.
disable_auto_redirect
tofalse
.Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: