[Feature request] send an user agent in hkp request

Phil Pennock gnupg-devel at spodhuis.org
Mon Feb 4 20:00:01 CET 2013


On 2013-02-04 at 19:00 +0100, Fabian Keil wrote:
> Additionally speculating based on the URL would be less reliable
> and I'd prefer using the same detection method for all clients.

What's unreliable about dispatching functionality based on the URL and
the path components?  That's how almost all web-servers work and is
fundamental to the model of URLs.

If the path starts /pks/ then it goes to the keyserver; it's something
speaking the Horowitz Keyserver Protocol, and if it isn't then tough,
because it has asked for that, as even on ports other than 11371 the
protocol, since the original thesis paper, has used URLs in that
namespace.  Specifically, `/pks/lookup` and `/pks/add`.

You get to use the hostname and the path.  That's sufficient for
everyone else, and dispatching functionality based on User-Agent has
always been far less reliable and advocated against, as it leads to new
User-Agents having to pretend to be old ones, to get past dated checks.

You _decide_ based on the URL; you might sometimes _speculate_ based on
the User-Agent and choose to override the URL for stuff like
bug-workarounds, setting additional HTTP headers in a response, for
instance.

The closest there is to a formal specification for HKP is
http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00
and you might want to read it.





More information about the Gnupg-devel mailing list