Skip to content

Commit 9180983

Browse files
committed
retry redirect to AlreadyVisitedUrl will loop error
1 parent 8e80593 commit 9180983

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

colly.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,6 @@ func (c *Collector) scrape(u, method string, depth int, requestData io.Reader, c
653653
}
654654
// note: once 1.13 is minimum supported Go version,
655655
// replace this with http.NewRequestWithContext
656-
if c.Context == nil {
657-
c.Context = context.Background()
658-
}
659656
req = req.WithContext(context.WithValue(c.Context, CheckRevisitKey, checkRevisit))
660657

661658
if err := c.requestCheck(parsedURL, method, req.GetBody, depth, checkRevisit); err != nil {

0 commit comments

Comments
 (0)