module

Deadfinder::StatusList

Parses the comma-separated status lists accepted by --accept-status and --dead-status/--exclude-status. An entry is either a bare code (403) or an inclusive range (400-499); surrounding whitespace is ignored so a shell-quoted "200, 204, 400-499" behaves the same as the compact form.

Codes above the usual 1xx-5xx band are accepted on purpose: real bot-defense responses use them (LinkedIn answers non-browser clients with 999).

Constants

MAX_STATUS = 999

Class methods

includes?(ranges : Array(Range(Int32, Int32)), status_code : Int32) : Bool

True when status_code falls in any of ranges. An empty list matches nothing, which is what keeps an unset flag from changing the policy.

Source
parse(raw : String) : Array(Range(Int32, Int32))
Source