You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the server gives back a 401 response and the "Www-Authenticate" header is missing, a null pointer Exception occurs in the function "http_utils_trim_whitespace()".
On line 70 in "/components/esp_http_client/lib/http_utils.c" a NULL pointer may be passed in, when header is missing:
...
char *end;
char *start = *str;
// Trim leading spacewhile (isspace((unsignedchar)*start)) start ++;
...
Expected Behavior
Maybe issue warning?
Debug Logs
I (12025) HTTP_CLIENT: Posting to https://192.168.1.130/
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4010d4dc PS : 0x00060930 A0 : 0x8010c01f A1 : 0x3ffcabe0
0x4010d4dc: http_utils_trim_whitespace at /home/peter/esp/esp-idf-master/components/esp_http_client/lib/http_utils.c:74 (discriminator 1)
Environment
Problem Description
When the server gives back a 401 response and the "Www-Authenticate" header is missing, a null pointer Exception occurs in the function "http_utils_trim_whitespace()".
On line 70 in "/components/esp_http_client/lib/http_utils.c" a NULL pointer may be passed in, when header is missing:
Expected Behavior
Maybe issue warning?
Debug Logs
I (12025) HTTP_CLIENT: Posting to https://192.168.1.130/
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4010d4dc PS : 0x00060930 A0 : 0x8010c01f A1 : 0x3ffcabe0
0x4010d4dc: http_utils_trim_whitespace at /home/peter/esp/esp-idf-master/components/esp_http_client/lib/http_utils.c:74 (discriminator 1)
A2 : 0x3ffcac00 A3 : 0x00000000 A4 : 0x3ff96354 A5 : 0x0000ca11
A6 : 0x00000191 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x3ffd4b04 A12 : 0x00000010 A13 : 0x00000000
A14 : 0x3ffcb230 A15 : 0xff000000 SAR : 0x00000010 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
Backtrace: 0x4010d4dc:0x3ffcabe0 0x4010c01c:0x3ffcac00 0x4010c392:0x3ffcac30 0x400d6aef:0x3ffcac50 0x400d6b87:0x3ffcace0
0x4010d4dc: http_utils_trim_whitespace at /home/peter/esp/esp-idf-master/components/esp_http_client/lib/http_utils.c:74 (discriminator 1)
0x4010c01c: esp_http_check_response at /home/peter/esp/esp-idf-master/components/esp_http_client/esp_http_client.c:981
0x4010c392: esp_http_client_perform at /home/peter/esp/esp-idf-master/components/esp_http_client/esp_http_client.c:981
0x400d6aef: http_rest() at /home/peter/esp/WTW_controller/main/API/http_client.cpp:109
0x400d6b87: http_test_task(void*) at /home/peter/esp/WTW_controller/main/API/http_client.cpp:498 (discriminator 8)
The text was updated successfully, but these errors were encountered: