Files
swift/test/unit/common/test_internal_client.py
Matthew Oliver b0245f4eb5 Proxy: override user_agent with backend_user_agent
The proxy currently _ALWAYS_ overrides any user_agent in requests with
`proxy-server <pid>`. This is what we want for any normal request. But
when using the internal client, which itself uses it's own proxy server,
we'd rather use the internal client's defined user_agent, so we can
track the source of the request in logs.

This patch adds a backend_user_agent to the proxy, that when set a proxy
will use this as a user_agent in a request.

Every member of the pipeline has a `_pipeline_final_app` to point to the
app (proxy), so uses this to directly set the proxies
backend_user_agent.

Closes-Bug: #1951304
Change-Id: I5f7bf65b4e747b5a93b79328fac640b791ecdc95
2022-01-28 09:46:56 -06:00

80 KiB