diff --git a/crawler/index.go b/crawler/index.go index 2ca8a0e..0572892 100644 --- a/crawler/index.go +++ b/crawler/index.go @@ -175,6 +175,8 @@ func (c *Crawler) checkResponse(resp *http.Response, url *url.URL) bool { switch resp.StatusCode { case http.StatusOK: // no-op + case http.StatusMethodNotAllowed: + return resp.Request.Method == "HEAD" case http.StatusTooManyRequests: retryAfter := resp.Header.Get("Retry-After") if retryAfter == "" {