Skip to content

Commit

Permalink
fix HTTP Basic Auth
Browse files Browse the repository at this point in the history
closes #51
  • Loading branch information
Kriechi committed Jan 20, 2024
1 parent 1838d5c commit aa0dc26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DuetRRFOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _send(self, command, query=None, next_stage=None, data=None, on_error=None,

if self._http_user and self._http_password:
auth = "{}:{}".format(self._http_user, self._http_password).encode()
headers['Authorization'] = 'Basic ' + base64.b64encode(auth)
headers['Authorization'] = 'Basic ' + base64.b64encode(auth).decode()

if data:
headers['Content-Type'] = 'application/octet-stream'
Expand Down

0 comments on commit aa0dc26

Please sign in to comment.