in HTTP headers can be set more than once - they can have multiple values. Its likely your response has both “foo” headers in it (you’ll need to see the raw response via
curl -v
or somesuch, as lots of clients/libraries only pull out one of the headers).
Its not really possible to “remove” a response header as it may already have been sent on the network.
j
Johann Pardanaud
10/21/2024, 5:46 PM
I’m not sure about the network part, since the
append
method is not suspending. However, you’re right, the header is just probably sent multiple times.