Skip to content
New issue

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

Recognise PATCH as a valid HTTP verb. #1

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/HTTP/Server/Simple.pm
Expand Up @@ -701,15 +701,15 @@ sub bad_request {

Given a candidate HTTP method in $method, determine if it is valid.
Override if, for example, you'd like to do some WebDAV. The default
implementation only accepts C<GET>, C<POST>, C<HEAD>, C<PUT>, and
C<DELETE>.
implementation only accepts C<GET>, C<POST>, C<HEAD>, C<PUT>, C<PATCH>
and C<DELETE>.

=cut

sub valid_http_method {
my $self = shift;
my $method = shift or return 0;
return $method =~ /^(?:GET|POST|HEAD|PUT|DELETE)$/;
return $method =~ /^(?:GET|POST|HEAD|PUT|PATCH|DELETE)$/;
}

=head1 AUTHOR
Expand Down