Set a proper agent string for Attica requests
ClosedPublic

Authored by leinir on Nov 21 2019, 3:36 PM.

Details

Summary

Rather than simply accepting the default value for the agent string,
which suggests that this library is Mozilla, we want to make requests
specifically with the name of what's actually making the request.

The usual reason for using the Mozilla identifier is that it makes
some websites send out webpages differently, but as we are interfacing
with a different type of server, we want to make sure that we are
sending out who we really are, rather than spoofing.

Diff Detail

Repository
R235 Attica
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Nov 21 2019, 3:36 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 21 2019, 3:36 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Nov 21 2019, 3:36 PM

Ping? If this (and the partner over at D25441) could get under way sooner rather than later, it would help a bunch with some bottleneck analysis...

davidedmundson added inline comments.
src/provider.cpp
1632

string.arg(foo, bar)

not

string.arg(foo).arg(bar)

otherwise we explode if foo contains the string "%1"

1634

where does %1 get set?

(same for the %2 below)

leinir updated this revision to Diff 70345.Nov 26 2019, 12:59 PM
leinir marked 2 inline comments as done.
leinir added inline comments.Nov 26 2019, 1:00 PM
src/provider.cpp
1632

Oh dear, yes, quite - thanks :) Old habits die hard, got a few places that'll want doing in... various places, i'll have to take a look.

davidedmundson accepted this revision.Dec 9 2019, 4:43 PM
This revision is now accepted and ready to land.Dec 9 2019, 4:43 PM
This revision was automatically updated to reflect the committed changes.