You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 14, 2020. It is now read-only.
discovery: correctly split DiscoverEndpoints and DiscoverPublicKeys
currently DiscoverEndpoints and DiscoverPublicKeys, despite their name,
returns both endpoints and keys.
Additionally their results are different.
For example: suppose in `example.com/images/app` we have this meta tags:
```
<meta name="ac-discovery" content="example.com https://storage.example.com/{name}-{version}.{ext}">
```
while in a parent path like `example.com/images` we have this meta tag:
```
<meta name="ac-discovery-pubkeys" content="example.com https://example.com/pubkeys.gpg">
```
Calling DiscoverEndpoints will stop at the meta tags in
`example.com/images/app` and return 1 endpoint and 0 pubkeys
Calling DiscoverPublicKeys won't find any meta tag in
`example.com/images/app` so will search in `example.com/images` and
return 0 endpoints and 1 keys
To avoid these problems these functions should return just their
requested type. So the user is not tempted to use the other type just
calling one of the functions. This mean that endpoints and keys discovery
must do different http calls.
* fix actool that used only DiscoverEndpoints to also get discovery
keys.
* Remove appending of previously discovered endpoint and keys since I
can't find a logic in it (simplyfing various functions).
* Rework tests to check also this and other kind of problems and be more fine grained.
0 commit comments