appc/spec

discovery: be more discerning about HTTP errors

Open

#114 opened on Jan 13, 2015

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Go (143 forks)github user discovery
component/toolinghelp wanted

Repository metrics

Stars
 (1,253 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Right now discovery just recursively walks up the tree on any error, alternately trying https and http. For example, when discovering the name example.com/foo/bar/baz, it will make requests like so: https://example.com/foo/bar/baz http://example.com/foo/bar/baz https://example.com/foo/bar/ http://example.com/foo/bar/ ...

However for a certain class of errors, it doesn't make much sense to do this; for example if dialing example.com:443 times out the first time it's probably not worth retrying it for every branch. Some errors should just propagate directly (fail early)

Contributor guide