Commit ecf7a96
committed
http_stream: enable HTTP Basic Auth
We've submitted a PR to Espressif to support enabling HTTP Basic Auth in
ESP-ADF's HTTP stream: espressif#1103. Unfortunately we'd also
require a change to ESP Audio to support enabling HTTP Basic Auth. As we
can't seem to find the ESP Audio source, we'll just enable it
unconditionally in ESP-ADF's HTTP stream. ESP Audio uses ESP-ADF's HTTP
Stream so this is enough to support HTTP Basic Auth to WIS by using a
URL in the form of http://user:[email protected]:19001/.
ESP-IDF's http_parser component will detect the username and password in
the URL, and esp_http_client will set the Authorization header if the
auth type is set to basic, and the parser found a username and password
in the URL. If the parser didn't find a username and password,
esp_http_client will just skip setting the header entirely, so having
auth type hardcoded to basic is not a problem even if users configure a
URL without username and password.1 parent a4c7bbe commit ecf7a96
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| |||
0 commit comments