Skip to content

Allow full control over User-Agent header#2492

Open
teodordelibasic-db wants to merge 1 commit intohyperium:masterfrom
teodordelibasic-db:skip-user-agent-if-set
Open

Allow full control over User-Agent header#2492
teodordelibasic-db wants to merge 1 commit intohyperium:masterfrom
teodordelibasic-db:skip-user-agent-if-set

Conversation

@teodordelibasic-db
Copy link

Motivation

Currently, tonic appends its user-agent string (tonic/x.x.x) to any existing User-Agent header on a request. This means middleware and applications built on top of tonic cannot have full control over the User-Agent header.

This addresses the original request in #970 for full control over the User-Agent header.

Solution

Skip setting the User-Agent header if it has already been set on the request, giving users complete control when needed.

Testing

Updated existing unit tests to verify the new behavior preserves the request's user-agent unchanged.

Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant