Set a proper agent string for Attica requests
ClosedPublic

Authored by leinir on Thu, Nov 21, 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.Thu, Nov 21, 3:36 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Nov 21, 3:36 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Thu, Nov 21, 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.Tue, Nov 26, 12:59 PM
leinir marked 2 inline comments as done.
leinir added inline comments.Tue, Nov 26, 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.Mon, Dec 9, 4:43 PM
This revision is now accepted and ready to land.Mon, Dec 9, 4:43 PM
This revision was automatically updated to reflect the committed changes.