Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve flatpak's user-agent so web servers will have better logs/stats #635

Closed
jgarciao opened this issue Mar 16, 2017 · 2 comments
Closed

Comments

@jgarciao
Copy link

Hi,

If I run this command in my computer with flatpak 0.8.4

flatpak install http://localhost/test-app/io.github.jgarciao.TestApp.flatpakref

I get this logs in Apache:


::1 - - [16/Mar/2017:17:21:26 +0100] "GET /test-app/io.github.jgarciao.TestApp.flatpakref HTTP/1.1" 200 2100 "-" "flatpak-builder libsoup/2.48.0"
::1 - - [16/Mar/2017:17:28:35 +0100] "GET /test-app/io.github.jgarciao.TestApp.flatpakref HTTP/1.1" 200 2100 "-" "flatpak-builder libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:43 +0100] "GET /test-app/repo/summary.sig HTTP/1.1" 200 637 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:43 +0100] "GET /test-app/repo/summary HTTP/1.1" 200 648 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:58 +0100] "GET /test-app/repo/config HTTP/1.1" 200 296 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:58 +0100] "GET /test-app/repo/summary.sig HTTP/1.1" 200 636 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:58 +0100] "GET /test-app/repo/summary HTTP/1.1" 200 648 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:58 +0100] "GET /test-app/repo/deltas/KY/j5MQPA+fLdXXsYCOWNPP71N3oOhBNLHBeytlMr89k/superblock HTTP/1.1" 404 577 "-" "ostree libsoup/2.48.0"
127.0.0.1 - - [16/Mar/2017:17:28:58 +0100] "GET /test-app/repo/objects/29/88f93103c0f9f2dd5d7b1808e58d3cfef5377a0e84134b1c17b2b6532bf3d9.commitmeta HTTP/1.1" 200 1220 "-" "ostree libsoup/2.48.0"

[...]

I see that flatpak is setting as user-agent "flatpak-builder libsoup/2.48.0" and ostree "ostree libsoup/2.48.0"

In my opinion it could be very useful to set an improved user-agent with some extra information like the flatpak version, the arch and even if it's possible the user's distribution. This way the HTTP server logs will be much more useful

@jgarciao
Copy link
Author

Thanks!

@jgarciao
Copy link
Author

In case you want to add also the distro name and version in the future maybe this code from gnome-software could be useful: https://git.gnome.org/browse/gnome-software/tree/lib/gs-os-release.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants