Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jan 8, 2025
1 parent ff8039a commit cab71e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions py/LunaTranslator/network/winhttp/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ def _parseurl2serverandpath(self, url):
path += "?" + query
return ishttps, server, port, path

def _parseheader(self, header):
if header is None:
return WINHTTP_NO_ADDITIONAL_HEADERS
return "\r\n".join(header)
def _parseheader(self, headers):
_x = []
for k in sorted(headers.keys()):
_x.append("{}: {}".format(k, headers[k]))
return "\r\n".join(_x)

def _setproxy(self, hsess, http_proxy_host, http_proxy_port):
if http_proxy_host is None or http_proxy_port is None:
Expand Down

0 comments on commit cab71e5

Please sign in to comment.