[please maintain the CC's]
I just received the following bug report on the Debian bug tracking
system. The patch seems to apply to 1.25; is it a good idea?
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| [EMAIL PROTECTED] | | [EMAIL PROTECTED] |
\--------------------------------/ \--------------------------------/
Package: libapache-mod-perl
Version: 1.21.20000309-1
Severity: wishlist
Tags: patch
Here is enclosed a patch to libapache-mod-perl to expose a missing
feature of the Apache API. This feature is needed to answer correctly
to HTTP 1.1 requests.
The patch is pretty much trivial and self-explanatory.
Although it was done on the libapache-mod-perl from potato, it applies
(with some offset) to the woody package.
Please send upstream too...
Phil.
diff -ru ../x/libapache-mod-perl-1.21.20000309/Apache/Apache.pm ./Apache/Apache.pm
--- ../x/libapache-mod-perl-1.21.20000309/Apache/Apache.pm Mon Mar 6 18:52:06 2000
+++ ./Apache/Apache.pm Thu Feb 8 18:04:16 2001
@@ -271,6 +271,18 @@
Returns true if the current request is the first internal request,
returns false if the request is a sub-request or internal redirect.
+=item $r->allowed($bitmask)
+
+Get or set the allowed methods bitmask. This allowed bitmask should be
+set whenever a 405 (method not allowed) or 501 (method not implemented)
+answer is returned. The bit corresponding to the method number should be
+et.
+
+ unless ($r->method_number == M_GET) {
+ $r->allowed($r->allowed | (1<<M_GET) | (1<<M_HEAD) | (1<<M_OPTIONS));
+ return HTTP_METHOD_NOT_ALLOWED;
+ }
+
=back
=head1 SUB REQUESTS
diff -ru ../x/libapache-mod-perl-1.21.20000309/src/modules/perl/Apache.xs ./src/modules/perl/Apache.xs
--- ../x/libapache-mod-perl-1.21.20000309/src/modules/perl/Apache.xs Sun Mar 5 16:54:10 2000
+++ ./src/modules/perl/Apache.xs Thu Feb 8 17:57:28 2001
@@ -1359,6 +1359,16 @@
OUTPUT:
RETVAL
+int
+allowed(r, ...)
+ Apache r
+
+ CODE:
+ get_set_IV(r->allowed);
+
+ OUTPUT:
+ RETVAL
+
time_t
request_time(r)
Apache r