Subject: | All HTTP Request Methods |
I'm way keen to implement WebDAV usning POE::Component::Server::HTTP - or extend Net::DPAP::Server using some of the WebDAV read/write HTTP methods - but "OPTIONS / HTTP/1.1", "PROPFIND / HTTP/1.1", "FOOBAR / HTTP/1.1", etc. requests aren't passed to my handler (bug #11777)
I hacked around this by disabling the "if ($method eq 'POST') {" test in POE::Filter::HTTPD - but there's probably a better way.
Please! Support all HTTP request methods!
Thanks for making POE awesome!
Jack
--- HTTPD.pm 2005/03/09 00:08:25 1.1
+++ HTTPD.pm 2005/03/09 16:47:41
@@ -93,7 +93,7 @@
# purely content. Return nothing until content-length bytes are in
# the buffer, then return the entire request.
- if($self->{header}) {
+ if ($self->{header}) {
my $buf = $self->{buffer};
my $r = $self->{header};
my $cl = $r->content_length() || "0 (implicit)";
@@ -102,7 +102,7 @@
$self->{finish}++;
return [$r];
} else {
- # print "$cl wanted, got " . length($buf) . "\n";
+ #print "$cl wanted, got " . length($buf) . "\n";
}
return [];
}
@@ -135,7 +135,7 @@
# Add the raw request's headers to the request object we'll be
# returning.
- if($proto >= $HTTP_1_0) {
+ if ($proto >= $HTTP_1_0) {
my ($key,$val);
HEADER:
while ($buf =~ s/^([^\012]*)\012//) {
@@ -169,10 +169,10 @@
# we're done. Otherwise we'll expect a subsequent get() call to
# finish things up.
- if($method eq 'POST') {
+ #if ($method eq 'POST') {
-# print "post:$buf:\END BUFFER\n";
-# print length($buf)."-".$r->content_length()."\n";
+ #print "post:$buf:\END BUFFER\n";
+ #print length($buf)."-".$r->content_length()."\n";
my $cl = $r->content_length();
unless(defined $cl) {
@@ -193,7 +193,7 @@
$self->{finish}++;
return [$r];
}
- }
+ #}
return [];
}