unixcharles / acme-client

A Ruby client for the letsencrypt's ACME protocol.
MIT License
495 stars 116 forks source link

Perhaps it's better to use an Array of Hash instead of Hash for HTTP response link headers #188

Closed sawanoboly closed 4 years ago

sawanoboly commented 4 years ago

Currently, the following implementation parses the Link header and converts it to Hash.

https://github.com/unixcharles/acme-client/blob/3b24f0243e2d19d7250afca3acdcac55775ad487/lib/acme/client/faraday_middleware.rb#L87-L97

However, as mentioned in certbot's comment, it is better to take into account that the same rel is used more than once.

https://github.com/certbot/certbot/pull/8080/files#diff-2ddf346e79198cd9bd28a8e8ee691b7bR802-R803

It's not urgent, but if there is a future change in the spec, such as multiple alternate certificates being issued in boulder, we may not be able to follow it.

unixcharles commented 4 years ago

https://github.com/unixcharles/acme-client/pull/191

unixcharles commented 4 years ago

Good catch.

Looking into it I also found that I'm not properly following the spec and it fail to match entries with a space (; rel= vs ;rel=)