class SendReq

Defined in:

deliver/send_req.cr

Instance Method Summary

Instance methods inherited from class Deliver

apply_all(endpoints : Array(Endpoint)) apply_all, apply_filters(endpoints : Array(Endpoint)) apply_filters, apply_matchers(endpoints : Array(Endpoint)) apply_matchers, filters : Array(String) filters, headers : Hash(String, String) headers, matchers : Array(String) matchers, proxy : String proxy, run run, undeliverable_count : Int32 undeliverable_count

Constructor methods inherited from class Deliver

new(options : Hash(String, YAML::Any)) new

Instance Method Detail

def run(endpoints : Array(Endpoint)) #

Every probe goes out with handle_errors: false, max_redirects: 0. The two belong together and neither is optional:

handle_errors defaults to true in Crest, which raises Crest::RequestFailed on any non-2xx. A probe's whole job is to fire the request — a 404 or a 500 is a delivered probe, not a delivery failure. Left on, it fed the failures counter below, and since path templates like /users/{id} are probed literally, most probes against a real app 404. The "N request(s) failed" line then fired en masse and buried the case it exists for: a genuinely broken target (bad -u, TLS rejection, network down).

max_redirects: 0 must be set alongside it, not alone — Redirector#check_max_redirects raises when max_redirects <= 0 && handle_errors, so setting it by itself turns every 3xx into a counted failure and makes things worse. Redirects are off because Crest copies the request headers onto the redirected request, including a --probe-header Authorization token, and follows absolute Locations to other hosts. Beyond the credential leak, following them generates traffic to URLs noir never discovered, which is not what "replay my endpoints" means.


[View source]