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: svn commit: r1753263 - in /httpd/httpd/trunk: include/httpd.h modules/http/http_protocol.c
Date Mon, 18 Jul 2016 16:32:54 GMT
Worse, in http 2.4, the first two registered methods collide with BREW and
WHEN. That said, the 'fix', if we wanted to resolve it, is to use M_INVALID
+3 as the first value.

I suggest on trunk we use a value outside the bitmask range of 0-63 as
INVALID and consider turning this into an array of 128 bits. mod_ftp, for
examples, implents many more non-http methods and relies on the method auth
logic.

On Jul 18, 2016 11:25 AM, "Jim Jagielski" <jim@jagunet.com> wrote:

> Doesn't this make this unsuitable for backport for 2.4?
>
> > On Jul 18, 2016, at 12:20 PM, wrowe@apache.org wrote:
> >
> > Author: wrowe
> > Date: Mon Jul 18 16:20:27 2016
> > New Revision: 1753263
> >
> > URL: http://svn.apache.org/viewvc?rev=1753263&view=rev
> > Log:
> > A whole lotta nope, if you implement HTCPCP then register your methods
> in init
> >
> > Modified:
> >    httpd/httpd/trunk/include/httpd.h
> >    httpd/httpd/trunk/modules/http/http_protocol.c
> >
> > Modified: httpd/httpd/trunk/include/httpd.h
> > URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1753263&r1=1753262&r2=1753263&view=diff
> >
> ==============================================================================
> > --- httpd/httpd/trunk/include/httpd.h (original)
> > +++ httpd/httpd/trunk/include/httpd.h Mon Jul 18 16:20:27 2016
> > @@ -612,9 +612,15 @@ AP_DECLARE(const char *) ap_get_server_b
> > #define M_MKACTIVITY            23
> > #define M_BASELINE_CONTROL      24
> > #define M_MERGE                 25
> > -#define M_INVALID               26      /** no valid method */
> > -#define M_BREW                  27      /** RFC 2324: HTCPCP/1.0 */
> > -#define M_WHEN                  28      /** RFC 2324: HTCPCP/1.0 */
> > +/* Additional methods must be registered by the implementor, we have
> only
> > + * room for 64 bit-wise methods available, so do not squander them
> (more of
> > + * the above methods should probably move here)
> > + */
> > +/* #define M_BREW                  nn */     /** RFC 2324: HTCPCP/1.0 */
> > +/* #define M_WHEN                  nn */     /** RFC 2324: HTCPCP/1.0 */
> > +#define M_INVALID               26      /** invalid method value
> terminates the
> > +                                         *  listed
> ap_method_registry_init()
> > +                                         */
> >
> > /**
> >  * METHODS needs to be equal to the number of bits
> >
> > Modified: httpd/httpd/trunk/modules/http/http_protocol.c
> > URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=1753263&r1=1753262&r2=1753263&view=diff
> >
> ==============================================================================
> > --- httpd/httpd/trunk/modules/http/http_protocol.c (original)
> > +++ httpd/httpd/trunk/modules/http/http_protocol.c Mon Jul 18 16:20:27
> 2016
> > @@ -718,8 +718,6 @@ AP_DECLARE(void) ap_method_registry_init
> >     register_one_method(p, "MKACTIVITY", M_MKACTIVITY);
> >     register_one_method(p, "BASELINE-CONTROL", M_BASELINE_CONTROL);
> >     register_one_method(p, "MERGE", M_MERGE);
> > -    register_one_method(p, "BREW", M_BREW);
> > -    register_one_method(p, "WHEN", M_WHEN);
> > }
> >
> > AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname)
> >
> >
>
>

Mime
View raw message