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
"""Sets response header values on an ASGI scope according to `the spec <https://asgi.readthedocs.io/en/latest/specs/www.html#response-start-send-event>`_.
Call AsgiSetter().set() multiple times with the same header name.
What is the expected behavior?
The 2nd call with the same header appends to the previous header value.
What is the actual behavior?
The result will be multiple headers with the same name are added instead of a single header with multiple values.
Additional context
Originally added by me (😬 ) at #817. It's also not 100% clear what the right behavior should be. Need to investigate the ASGI spec and what happens with multiple tuples with the same header name.
The text was updated successfully, but these errors were encountered:
Describe your environment
Using FastAPI 0.79 and relying on the
AsgiSetter
. TheAsgiSetter
has a surprising result to always append values instead of overriding previous keys.opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
Lines 219 to 240 in fbac424
Steps to reproduce
Call
AsgiSetter().set()
multiple times with the same header name.What is the expected behavior?
The 2nd call with the same header appends to the previous header value.
What is the actual behavior?
The result will be multiple headers with the same name are added instead of a single header with multiple values.
Additional context
Originally added by me (😬 ) at #817. It's also not 100% clear what the right behavior should be. Need to investigate the ASGI spec and what happens with multiple tuples with the same header name.
The text was updated successfully, but these errors were encountered: