aboutsummaryrefslogtreecommitdiff
path: root/crawler_test.go
diff options
context:
space:
mode:
authorale <ale@incal.net>2018-08-31 10:36:49 +0100
committerale <ale@incal.net>2018-08-31 10:36:49 +0100
commit9825334954ec555a9798e8e9be1ac04093595793 (patch)
treeaf898b7f30294c5edc784de591f083ab21a3ebef /crawler_test.go
parent70c12b7a5de3fe635f4f49aa7e249f5d6141d2af (diff)
downloadcrawl-9825334954ec555a9798e8e9be1ac04093595793.tar.gz
crawl-9825334954ec555a9798e8e9be1ac04093595793.zip
Explicitly delegate retry logic to handlers
Makes it possible to retry requests for temporary HTTP errors (429, 500, etc).
Diffstat (limited to 'crawler_test.go')
-rw-r--r--crawler_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawler_test.go b/crawler_test.go
index 66acbe4..fecc850 100644
--- a/crawler_test.go
+++ b/crawler_test.go
@@ -44,7 +44,7 @@ func TestCrawler(t *testing.T) {
return nil
})
- crawler, err := NewCrawler(dir+"/crawl.db", seeds, scope, FetcherFunc(http.Get), NewRedirectHandler(h))
+ crawler, err := NewCrawler(dir+"/crawl.db", seeds, scope, FetcherFunc(http.Get), FollowRedirects(h))
if err != nil {
t.Fatal("NewCrawler", err)
}