httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cody Sherr <>
Subject Re: [PATCH] <limit> directive extended to arbitrary methods
Date Wed, 01 Aug 2001 23:23:54 GMT

Well, the reservation happens at run time, so you would just bump
METHOD_NUMBER_FIRST, and #define the M_FOO to the method number.

It's actually easier than that. Any new method wouldn't need to be added
with a #define, you can simply call


during init, and FOO could be <limited> in the config file, and checked
during request.


will return the offset of the dynamically registered request method, if
you want to check during an auth phase. You don't need to worry if that is
22 or 42, here's an example:

if (mask & (1 << ap_method_number_of("FOO"))

It's not as efficient as a constant, but I used a hash table so it's O(1)
instead of the linked list implemenation previously offered for extension
request methods.


Cody Sherr

Covalent Technologies

phone: (415)536-5292

On Wed, 1 Aug 2001, Chuck Murcko wrote:

> Cool. Should we plan to reserve some bits for possible future official
> methods?
> Chuck
> On Wednesday, August 1, 2001, at 12:40 PM, Cody Sherr wrote:
> >
> > This is a repost of the patch with the proper [PATCH] Subject: line.
> >
> > The purpose of this patch is to allow modules to register request
> > methods,
> > and have those methods <limit>able in the httpd.conf. It uses the same
> > bit
> > mask/shifted offset as the original HTTP methods such as M_GET or
> > M_POST,
> > but expands the total bits from an int to an ap_int64_t to handle more
> > bits for new request methods than an int provides.
> >
> >
> Chuck Murcko
> Topsail Group

View raw message