Skip to content

Support HTTP request method fallback #1327

@sanmai-NL

Description

@sanmai-NL

Some misconfigured webservers don't accept HEAD requests, but using HEAD is more efficient and appropriate in general. As a rough but effective work-around, allow the configuration key method to be a list ["head", "get"] instead of a string, where Lychee's checking algorithm falls back to the subsequent HTTP method in the list if the former gives an error response. Regrettably, in practice the response codes returned upon HEAD requests by these misconfigured webservers vary (404, 403, etc.), so don't bother to implement a fallback condition evaluator.

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions