News for hackers. Stuff that matters.
Re:User Agent Changes by JoshTriplett on Thursday December 12, 2019 @08:39PM (#21778386)
I wonder if it'd be too late for http/3 to say "user-agent is deprecated, user-agents should not send it, any server accepting http/3 may assume the following compatibility value for the header without it being sent".

Was anything like that considered during the http/3 design process?

(I saw the linked "client hints" proposal in the article, but that doesn't mention the idea of completely dropping the header from client requests and assuming a certain baseline value for http/3.)

Re:User Agent Changes by toast0 on Thursday December 12, 2019 @09:12PM (#21778585)
User-Agent for browsers is pretty much useless now, but it's still a pretty useful name for a header if you want to put real information in it. Ex, if you're calling an api, it's nice to have a version number and a name/contact so broken things can be fixed.

I don't remember if HTTP/2 (and presumably /3) has a initial dictionary for header compression, they could have a suggested value in there, so if you want to look like a browser, you can use that at a low byte cost.

Re:User Agent Changes by edoceo on Thursday December 12, 2019 @09:27PM (#21778664)
I make an API, for narrow use case. All calls have to be from a registered UA, among other things forms the HMAC sig.
Re:User Agent Changes by sk5t on Thursday December 12, 2019 @09:44PM (#21778730)
You have created a perverse-sounding design.
Re:User Agent Changes by neikos on Friday December 13, 2019 @02:32AM (#21779790)
This sounds like authentication with extra steps? Why not just send a bearer token?
Re:User Agent Changes by edoceo on Friday December 13, 2019 @08:00AM (#21781141)
We do. Header is for message signing. And UA has to be registered, part of the spec provided by client.
Re:User Agent Changes by denormalfloat on Friday December 13, 2019 @01:38AM (#21779596)
This would not work, too many websites (perhaps wrongly) depend on this string.
Re:User Agent Changes by JoshTriplett on Friday December 13, 2019 @01:45AM (#21779622)
I'm specifically suggesting that http/3 could have an implied value for this header if not supplied, so that omitting it was semantically equivalent (and a server could synthesize it).
Re:User Agent Changes by denormalfloat on Sunday December 22, 2019 @09:57PM (#21861192)
That's not how HTTP works. HTTP is a transfer protocol, and is not so opinionated on the semantic meaning of the Data it moves. HTTP, HTTP/2, and HTTP/3 were designed to be backwards compatible. It would break that compatibility if there were a semantic change in the absence of the UA string. Specifically, H/3 requests couldn't be downgraded to HTTP/1.1 requests by proxies. There are a lot of proxies.
Re:User Agent Changes by JoshTriplett on Tuesday December 24, 2019 @08:52PM (#21876197)
> It would break that compatibility if there were a semantic change in the absence of the UA string. Specifically, H/3 requests couldn't be downgraded to HTTP/1.1 requests by proxies.

It would not reduce the semantic meaning of HTTP to say "in http/3, the default value of the user-agent header is XYZ (a non-specific modern browser), and if you want an empty header, you must specify the header with an empty value. Proxies and other software translating requests between http/3 and older versions of http should map an omitted header in http/3 to this value, and should map an empty string to a missing header."

It would certainly require change, and it isn't a change likely to happen at this point, but it wouldn't have been impossible, nor would it have reduced the fidelity of http. It simply would have changed the default assumption from "something too ancient to identify itself" to "something modern that doesn't want to identify itself".