Skip to content

transport/http: User agent is ignored #3049

@enocom

Description

@enocom

In google.golang.org/api/transport/http.NewClient, execution eventually reaches this code:

headers := http.Header{}
if ds.QuotaProject != "" {
headers.Set("X-goog-user-project", ds.QuotaProject)
}
if ds.RequestReason != "" {
headers.Set("X-goog-request-reason", ds.RequestReason)
}

Note that the user agent isn't set, whereas it is in the other code path:

userAgent: settings.UserAgent,

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions