forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: restart TCP connection if HTTP server sends Connection:close
we previously performed a whole new GET request when doing digest authentication. it seemed beneficial to reuse the TCP connection to perform the second GET request, which includes the authentication tokens. however, if the server sends "Connection: close" we must not requse the TCP connection for another HTTP request. this broke authentication against Shelly devices (at least those with original firmware). now we explicitly set "Connection: keep-alive" in our request, and reuse the TCP connection only if te server replies with "Connection: keep-alive" as well.
- Loading branch information
1 parent
b5785d0
commit 63612e9
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters