Bug 497223 - User agent set for specific sites no longer work
Summary: User agent set for specific sites no longer work
Status: ASSIGNED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: 24.08.3
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Juraj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-09 06:06 UTC by ewnme
Modified: 2024-12-12 23:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of custom User Agent Manager setting for specific web page not sent correctly (153.13 KB, image/png)
2024-12-09 06:06 UTC, ewnme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ewnme 2024-12-09 06:06:28 UTC
Created attachment 176454 [details]
Screenshot of custom User Agent Manager setting for specific web page not sent correctly

SUMMARY
In the User Agent Manager, when setting a custom user agent string for specific sites,  Falkon 24.08.3 still sends the global string instead.

STEPS TO REPRODUCE
1. Create a web page that requires a custom user agent string to access it, such as PHP's $_SERVER['HTTP_USER_AGENT'] variable.
2. Create a custom user agent for that web page in the User Agent Manager for that specific domain and/or page
3. Attempt to access the page in Falkon 24.08.3

OR

1.  Create a web page that echos the user agent string
2.  Create a custom user agent for that web page or the domain
3.  Open the page in Falkon 24.08.3 

OBSERVED RESULT
The user agent string is the Global one, rather than the custom one set for that specific page or domain

EXPECTED RESULT
The user agent string should be the one set in the section for specific sites.

SOFTWARE/OS VERSIONS
Linux:  Linux Mint Versions 21 & 22

ADDITIONAL INFORMATION
Comment 1 Juraj 2024-12-09 08:03:08 UTC
Hello, it works fine for me.
I believe this weorks with QUrl.host() only, so remove the "https://" and the trailing slash.

When I write "duckduckgo.com" and user "whatever" as userAgent, DuckDuckGo will see "whatever" as user agent.

PS: I agree with that this dialog needs some polishing.

Best regards,
Juraj
Comment 2 Bug Janitor Service 2024-12-10 23:23:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/falkon/-/merge_requests/100