Skip to content

Commit

Permalink
Add support for X-WWW-Authenticate header
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFEEDC0DE64 committed Aug 23, 2023
1 parent 52bca70 commit cbe8705
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/esp_http_client/esp_http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ static int http_on_header_value(http_parser *parser, const char *at, size_t leng
} else if (strcasecmp(client->current_header_key, "Transfer-Encoding") == 0
&& memcmp(at, "chunked", length) == 0) {
client->response->is_chunked = true;
} else if (strcasecmp(client->current_header_key, "WWW-Authenticate") == 0) {
} else if (strcasecmp(client->current_header_key, "WWW-Authenticate") == 0 ||
strcasecmp(client->current_header_key, "X-WWW-Authenticate") == 0) {
http_utils_append_string(&client->auth_header, at, length);
}
http_utils_append_string(&client->current_header_value, at, length);
Expand Down

0 comments on commit cbe8705

Please sign in to comment.