Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With newer version of Mojolicious::Plugin::OpenAPI HEAD requests are broken as no spec can be found. Hence the default_spec is used - which requires the 'errors' property. But usually a HEAD request is successful, hence no 'errors' property. This leads to a '500 Internal Server Error' response. A HEAD request is some kind of a GET request (it requests the headers that would be returned if the resource was requested with a GET request. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD). So the HEAD request should be treated as a special case.
- Loading branch information