httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] repost: <limit> directive extended to arbitrary methods
Date Thu, 02 Aug 2001 03:52:42 GMT
From: "Ryan Bloom" <rbb@covalent.net>
Sent: Wednesday, August 01, 2001 10:28 PM


> I'll be committing this tonight.  The only change I will be adding, is that the macro
is
> going to be capitalized, because all macros should always be capitalized.

I caught that... the other bit that I hinted at in my last message was pretty simple...

when we first query, if the table doesn't exist, stuff elements n .. FIXED_METHODS

+++ include/httpd.h 2001/08/02 01:41:18
@@ -478,8 +478,6 @@
 /* Methods recognized (but not necessarily handled) by the server.
  * These constants are used in bit shifting masks of size int, so it is
  * unsafe to have more methods than bits in an int.  HEAD == M_GET.
- * This list must be tracked by the list in http_protocol.c in routine
- * ap_method_name_of().


Don't you dare eliminate that comment!!!


@@ -498,7 +496,10 @@
 #define M_UNLOCK    14
 #define M_INVALID   15

-#define METHODS     16
+/* METHODS needs to be equal to the number of bits
+ * we are using for limit masks.
+ */
+#define METHODS     64


Add one more placeholder, FIXED_METHODS, corresponding to the last M_INVALID + 1.

Stuff them in the hash and pull out all the bogus tests from ap_method_number_of!!!
You can't add a new 'GOOBLE' method, it will map to 'G' -- 'GET'.


Other than that?

+1 :)

Bill



> On Wednesday 01 August 2001 18:45, Cody Sherr wrote:
> > I've added a macro to ease checking if a method is allowed in a mask:
> >
> > ap_method_check_allowed(mask, methname)
> >
> > in accordance with Will Rowe's recommendation today.
> >
> > thanks,
> 
> -- 
> 
> _____________________________________________________________________________
> Ryan Bloom                        rbb@apache.org
> Covalent Technologies rbb@covalent.net
> -----------------------------------------------------------------------------
> 


Mime
View raw message