-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
ENH: Add operating system to user-agent #344
Conversation
Codecov Report
@@ Coverage Diff @@
## main #344 +/- ##
=======================================
Coverage 78.28% 78.28%
=======================================
Files 46 46
Lines 5493 5494 +1
=======================================
+ Hits 4300 4301 +1
Misses 1193 1193
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I can't say I'm terribly happy to see pyVO leaking more information on the client than absolutely necessary, and I'm not convinced information on the platform people use count as "absolutely necessary". Then again, very few people care to tame their browsers' chattiness in that respect, so it's not like we're betraying secrets folks generally care about. Still: What exactly is this supposed to help with/fix? |
The use case is from the |
The question here is really if the OS information is something useful to have in general for service providers to improve their services. The |
What do you think @tomdonaldson? |
Having some stats on the platform is also rather useful info to know how much effort to put into fixing exotic bugs. E.g. we regularly receive reports from packagers about issues with some edge cases, knowing whether there is any realistic chance that those affect actual users would be useful. (And as it was said above, none of these are super secrets anyways but rather standards stats most webpages and apis already collecting). |
Just in case you're waiting for my blessing: Totally feel free to
merge from my side [I can't resist pointing out I mainly don't care
because almost nobody cleans their browser strings, so they clearly
don't feel this info is a breach of their privacy. I'm still
unconvinced platform stats -- as opposed the client software itself
-- help in practice.]
Ah, wait, one thing. *If* we touch this, can we briefly see whether
we ought to do something wrt
https://ivoa.net/documents/Notes/softid/index.html?
|
Hi @msdemlei. The new format would just append |
On Mon, Jul 11, 2022 at 04:19:48PM -0700, Dustin wrote:
The new format would just append `(%OS_NAME)`. If that doesn't
conform to anything in that document we can rework the layout. The
examples
(https://ivoa.net/documents/Notes/softid/20210115/NOTE-softid-1.0-20210115.html#tth_sEc2.3)
suggest that wrapping it in parentheses may not be necessary
though. Do you have a strong opinion on that?
No, I have no strong opinion (just weak skepticism:-).
The question is what you want to communicate. As per the grammar
we're reproducing in sect. 2.1, the user agent header contains a set
of product ids, possibly qualified with comments. So, if you say
pyVO/1.5 (MaginificentLinux/10.29.1pl23)
you're really saying "This is pyVO 1.5, and by the way, I'm somehow
related to some specific Linux Distro).
If you said
pyVO/1.5 MagificentLinux/10.29.1pl23
instead, you'd be saying "this is pyVO 1.5 running on top of
thisandthat Distribution".
Which is preferable hence really depends on why you're communicating
the platform in the first place. Is it because pyVO will behave
differently on different platforms? Then the comment thing might be
preferable. Is it because you're interested in platforms
independently of pyVO? Then mark it up as a separate component.
But while I'm looking at things: Be sure to check RFC 2616 (or even
better the appropriate successor) to see what you should do when
there's whitespace in OS_NAME -- I *think* you need quotes, but given
I'm on holidays I can't be bothered to look it up...
|
According to https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6:
I'm pretty sure it's referring to the entire value though, not just the OS name appendage. Mozilla has examples (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent):
There are no quotes around the OS names here, and there are parentheses. RFC 7231 and 7230 succeed 2616, and also states:
Where the product is a I'm happy to remove the parentheses, but it would also be beneficial to remain consistent with what may be expected. Thoughts? |
On Mon, Aug 08, 2022 at 06:38:14AM -0700, Dustin wrote:
I'm happy to remove the parentheses, but it would also be
beneficial to remain consistent with what may be expected.
Thoughts?
Not from me. I'd say just merge it like it is; I doubt the ALMA
people will care either way.
|
Add system to user-agent.