-
Notifications
You must be signed in to change notification settings - Fork 2.6k
User agent in http header #9632
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
Conversation
Given we are at this, and this is not (yet) set in stone: could it make sense to have UserAgent be made backward compatible so that when used here the first few elements matches the old syntax?
This would require changing UserAgent string, but I think it might be for the better to have a simpler space delimited string. I would also consider having the last part of the user-agent be non-optional, with a default of "default" or something, this would also simplify parsing (say we add stuff after, it's not super cool to parse A B C [D] [E], if both D and E can be optional). |
Hmm. It might make sense to deviate even farther from the original format of
Here is why:
One more consideration is that listing products/layers in descending importance order and placing product detail in parentheses is what the user-agent spec asks for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
@carlopi can this be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
Merge pull request duckdb/duckdb#9632 from motherduckdb/user_agent_in_http_header
This is a follow up from #9603 (comment).
DBConfig::UserAgent()
does not have the git SHA, so I keptDuckDB::SourceID()
as the last token in the HTTP User-Agent header sent.CLI Before:
CLI After:
Example from a Go app