mirror of
https://github.com/LukeHagar/slinky.git
synced 2025-12-06 04:21:20 +00:00
Update CheckURLs function to treat HTTP 408 status as valid links alongside 401 and 403. This change enhances the URL validation logic by allowing for additional scenarios where links may be valid but require authorization or indicate a timeout.
This commit is contained in:
@@ -63,8 +63,8 @@ func CheckURLs(ctx context.Context, urls []string, sources map[string][]string,
|
||||
if resp != nil && resp.Body != nil {
|
||||
resp.Body.Close()
|
||||
}
|
||||
// Treat 401/403 as valid links (exist but require authorization)
|
||||
if status == http.StatusUnauthorized || status == http.StatusForbidden {
|
||||
// Treat 401/403/408 as valid links
|
||||
if status == http.StatusUnauthorized || status == http.StatusForbidden || status == http.StatusRequestTimeout {
|
||||
ok = true
|
||||
err = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user