Open sairan22 opened 1 year ago
@sairan22 - is it a GET or POST?
GET has no Content-Length
POST usually must have a non zero Content-Length
GET is okay since Content-Length is always zero and the bug doesn't get triggered.
The bug is triggered this way:
I should've mentioned that the early portion of the debug log (where POST were sent) had been truncated by my terminal logger since it was too long.
It seems you have also modified the library HTTPClient_200fix.cpp
which then crashes.
Nope. The debug log is on the original codes. (I copied original HTTPclient to HTTPclient_200fix, and do the debug log). I then modified it with the fix copied from ESP8266HTTPclient.cpp which fixed the bug.
Board
any ESP32
Device Description
any device
Hardware Configuration
No.
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
https://script.google.com
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
HTTPclient incorrectly set the "Content-Length" when following redirect (dropped to GET/HEAD).
To fix it, replace line 605 - 607 with the following (same as that in ESP8266HTTPclient):
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide