-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle 404 from the remotes #691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things I don't get + one not very important suggestion.
data: bytes = content.data | ||
print(f"{TEXT_COLOR_GREEN}remote content: {data} {TEXT_COLOR_DEFAULT}") | ||
|
||
response_text = data.decode("utf-8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, just a stupid question.
Why do we decode headers with ascii
and decode content with utf-8
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I'm unsure if headers are utf-8-encoded ...
ws_session = aiohttp.ClientSession() | ||
async with ws_session.ws_connect( | ||
instance_ws, headers={"Authorization": f"Bearer {app_key}"} | ||
) as ws: | ||
await ws.send_str(f"GET {query_string} HTTP/1.0\n\n") | ||
await ws.send_str(f"GET {query_string} HTTP/1.0\r\n\r\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for the comment
closes #692