httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Eissing <stefan.eiss...@greenbytes.de>
Subject Protocols directive, NEW
Date Fri, 24 Jul 2015 12:23:48 GMT
In best programmers' tradition, I just made a large commit just before my vacation...In good
Apache tradition, however, I ran all regression tests with it. So, hopefully this works for
you as well, otherwise, please just revert the commit and curse my name.

CAVEAT: this commit changes mod_ssl and core_config structures. A "make clean" is recommended.
As the core API was extended, you might also have to delete installed header files.

The new directive "Protocols" is implemented for server and vhosts. Example

  Protocols http/1.1 h2             #supports HTTP/1 and HTTP/2 (when over TLS) and prefers
to talk HTTP/1.

  Protocols h2 spdy/3.1 http/1.1    #HTTP/2 is preferred over spdy with HTTP/1.1 coming last.

When no "Protocols" are specified, all protocols implemented in the server can be negotiated.
Protocols from a base server are additive. The ALPN negotiated now calls the new core APIs
which can be found in http_protocol.h (seemed the most suitable place).

Registration is done in three hooks. An implementation can be seen in h2_switch.c

Missing:
- Directive documentation (My excuse is that it will change after feedback+discussion anyway)
- Ordering directive - not sure if we need it. I will ask the browser implementors on the
HTTP workshop on Monday what their requirements are

Discussion:
- Is the default for "Protocols" what we want?
- Is the additive nature of "Protocols" what we want?
- Is this the right abstraction? I tried to make it general enough that other mechanisms may
use the same API and other protocols find it easy to register. Nevertheless, once cannot foresee
the future and what requirements come up. My overall impression is that the code is smaller
and cleaner now. mod_h2's pre-connection hook with registration became unnecessary.

Cheers,

  Stefan


<green/>bytes GmbH
Hafenweg 16, 48155 Münster, Germany
Phone: +49 251 2807760. Amtsgericht Münster: HRB5782




Mime
View raw message