esp_http_client: Fixed exception on 401 without Www-Authenticate header

Closes https://github.com/espressif/esp-idf/issues/2246
This commit is contained in:
Tuan PM
2018-07-31 23:25:11 +07:00
parent 8a1adb0d50
commit 9a273863ba
2 changed files with 15 additions and 6 deletions

View File

@@ -63,8 +63,14 @@ char *http_utils_assign_string(char **str, const char *new_str, int len)
void http_utils_trim_whitespace(char **str)
{
char *end;
char *start = *str;
char *end, *start;
if (str == NULL) {
return;
}
start = *str;
if (start == NULL) {
return;
}
// Trim leading space
while (isspace((unsigned char)*start)) start ++;