We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPTIONS *
See https://tools.ietf.org/html/rfc7230#section-5.3.4, https://tools.ietf.org/html/rfc7231#section-4.3.7.
The following patch (untested) restores compliance with the spec.
diff --git a/lib/Plack/Middleware/Lint.pm b/lib/Plack/Middleware/Lint.pm index eb3deee..be422f5 100644 --- a/lib/Plack/Middleware/Lint.pm +++ b/lib/Plack/Middleware/Lint.pm @@ -42,7 +42,10 @@ sub validate_env { unless (defined($env->{PATH_INFO})) { # allows empty string die('Missing mandatory env param: PATH_INFO'); } - if ($env->{PATH_INFO} ne '' && $env->{PATH_INFO} !~ m!^/!) { + if ($env->{PATH_INFO} ne '' && $env->{PATH_INFO} !~ m!^/! && + !($env->{REQUEST_METHOD} eq 'OPTIONS' && + $env->{REQUEST_URI} eq '*') + ) { die('PATH_INFO must begin with / ($env->{PATH_INFO})'); } unless (defined($env->{SERVER_NAME})) {
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See https://tools.ietf.org/html/rfc7230#section-5.3.4,
https://tools.ietf.org/html/rfc7231#section-4.3.7.
The following patch (untested) restores compliance with the spec.
The text was updated successfully, but these errors were encountered: