After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782297 - Add possibility to set User-Agent for requests
Add possibility to set User-Agent for requests
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: map-sources
unspecified
Other All
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2017-05-07 13:52 UTC by Jens Georg
Modified: 2017-05-20 21:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add possibility to set User-Agent for requests (6.23 KB, patch)
2017-05-07 13:52 UTC, Jens Georg
none Details | Review
Add possibility to set User-Agent for requests (6.24 KB, patch)
2017-05-12 19:46 UTC, Jens Georg
none Details | Review

Description Jens Georg 2017-05-07 13:52:08 UTC
Make it possible to override the default user-agent.
Comment 1 Jens Georg 2017-05-07 13:52:11 UTC
Created attachment 351298 [details] [review]
Add possibility to set User-Agent for requests
Comment 2 Jiri Techet 2017-05-10 21:33:22 UTC
Thanks, makes sense.

Two comments:

You apparently copy/pasted the code from ChamplainNetworkBboxTileSource to ChamplainNetworkTileSource and forgot to remove the "bbox" from CHAMPLAIN_IS_NETWORK_BBOX_TILE_SOURCE inside the champlain_network_tile_source_set_user_agent() implementation.

Next, for consistency I'd prefer replacing

ChamplainNetworkTileSource *self

in function declarations to

ChamplainNetworkTileSource *tile_source

which is used everywhere else. Otherwise LGTM
Comment 3 Jens Georg 2017-05-12 19:46:24 UTC
Created attachment 351750 [details] [review]
Add possibility to set User-Agent for requests
Comment 4 Jiri Techet 2017-05-20 21:34:41 UTC
Sorry for the delay - looks good, committed. Thanks!