You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KeyError 'https,http' in async handling 1.31.0 #2370
Thinking this through a bit more, I'm becoming of the opinion that upstream problem or not, the sentry-sdk should simply be robust for this. My thinking is: it should never be so that the introduction of a framework to detect errors is in itself what causes failure.
Thanks for reporting this and also submitting a PR fixing it in one go! Awesome!
This will be merged and then release with the next version of the Python SDK.
Activity
vanschelven commentedon Sep 14, 2023
I'm behind a proxy, and
the proxy hasin instances of this error occurring the headerx-forwarded-proto: https.x-forwarded-proto: https,httpis sent.[-]KeyError 'http,https' in async handling 1.31.0[/-][+]KeyError 'https,http' in async handling 1.31.0[/+]vanschelven commentedon Sep 14, 2023
In channels (4.0.0) in the following line
schemealready has the valuehttps,http:File "/home/vcap/deps/0/python/lib/python3.9/site-packages/channels/routing.py", line 62, in __call__vanschelven commentedon Sep 14, 2023
The value of
x-forwarded-protocomes from the Cloud Foundry gorouter:https://docs.cloudfoundry.org/concepts/http-routing.html#X-Forwarded-Proto
I can't find an actual standard for this header, but I don't think it's unique and it would be good if sentry-sdk didn't introduce an error here.
vanschelven commentedon Sep 14, 2023
Arguably, this is actually a problem in uvicorn; I've started a discussion there
vanschelven commentedon Sep 14, 2023
Thinking this through a bit more, I'm becoming of the opinion that upstream problem or not, the sentry-sdk should simply be robust for this. My thinking is: it should never be so that the introduction of a framework to detect errors is in itself what causes failure.
Don't fail when upstream scheme is unusual
antonpirker commentedon Sep 15, 2023
Hey @vanschelven !
Thanks for reporting this and also submitting a PR fixing it in one go! Awesome!
This will be merged and then release with the next version of the Python SDK.
Don't fail when upstream scheme is unusual (#2371)
Don't fail when upstream scheme is unusual (#2371)