Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default User-Agent regression #2193

Merged
merged 1 commit into from
Nov 18, 2023
Merged

Conversation

tfaughnan
Copy link
Contributor

The recent HTTP client refactor in 14e25ab introduced a bug in which the global default User-Agent is no longer used for requests. Unless a per-feed User-Agent exists, the Go standard library's default User-Agent is used, which looks something like "Go-http-client/1.1". To fix this, make RequestBuilder.WithUserAgent take an additional argument, the default User-Agent, which will be used if there is no per-feed User-Agent (i.e. it is an empty string).

Fixes #2188
Fixes #2189


Do you follow the guidelines?

The recent HTTP client refactor in 14e25ab
introduced a bug in which the global default User-Agent is no longer
used for requests. Unless a per-feed User-Agent exists, the Go standard
library's default User-Agent is used, which looks something like
"Go-http-client/1.1". To fix this, make RequestBuilder.WithUserAgent
take an additional argument, the default User-Agent, which will be used
if there is no per-feed User-Agent (i.e. it is an empty string).

Fixes miniflux#2188
Fixes miniflux#2189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants