Skip to content

Commit

Permalink
Add flatpak version to user agent
Browse files Browse the repository at this point in the history
This uses the new ostree feature at:
  ostreedev/ostree#1496

Note, this will only work with the current ostree master,
and does nothing on older versions.
  • Loading branch information
alexlarsson committed Mar 28, 2018
1 parent 3273e99 commit 22d19ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/flatpak-dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,8 @@ get_common_pull_options (GVariantBuilder *builder,
g_variant_builder_add (&hdr_builder, "(ss)", "Flatpak-Ref", ref_to_fetch);
g_variant_builder_add (builder, "{s@v}", "http-headers",
g_variant_new_variant (g_variant_builder_end (&hdr_builder)));
g_variant_builder_add (builder, "{s@v}", "append-user-agent",
g_variant_new_variant (g_variant_new_string ("flatpak/" PACKAGE_VERSION)));

if (progress != NULL)
update_freq = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (progress), "update-frequency"));
Expand Down

0 comments on commit 22d19ec

Please sign in to comment.