[BUG] Default User-Agent setting is not applied to actual download requests
Description
After changing the default User-Agent in the Gopeed client settings, newly created downloads still appear to use Gopeed's original/default Mozilla User-Agent instead of the value configured by the user.
The setting itself can be changed and saved in the client, but the actual HTTP download request does not seem to use the configured User-Agent.
Expected behavior
After changing the default User-Agent in Gopeed settings, new HTTP/HTTPS download tasks should automatically use that User-Agent unless the task explicitly overrides it with a per-task header.
For example:
- Open Gopeed settings.
- Change the default User-Agent from the built-in/default value to a custom value.
- Save the setting.
- Create a new HTTP/HTTPS download task.
- Inspect the request User-Agent on the server side or through request inspection.
The request should contain the custom User-Agent configured in Gopeed.
Actual behavior
Even after changing the default User-Agent in settings, downloads still send the original/default Mozilla-style User-Agent, as if the setting had not been applied to the HTTP request.
Steps to reproduce
- Open the Gopeed client.
- Go to settings and change the default User-Agent to a clearly identifiable custom value, for example:
Gopeed-UA-Test/1.0- Save the setting.
- Start a new HTTP/HTTPS download.
- Check the User-Agent received by the download server.
Result
The server still receives the original/default Mozilla User-Agent instead of:
Gopeed-UA-Test/1.0Additional information
This seems different from older issues about the User-Agent setting being cleared or not persisted after restarting the app.
In this case, the configured value remains visible in settings, but it does not appear to be applied to the actual download request.
Related issues:
- #276 — remembering the last User-Agent
- #1063 — settings including User-Agent being reset
- #1177 — User-Agent being cleared after restarting
- #1552 — domain-specific persistent custom HTTP headers
The main issue here is that the global/default User-Agent setting and the User-Agent actually used by HTTP download requests appear to be out of sync.
Source: GopeedLab/gopeed