Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4B57183F9 for ; Fri, 24 Jul 2015 12:24:01 +0000 (UTC) Received: (qmail 84336 invoked by uid 500); 24 Jul 2015 12:24:01 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 84278 invoked by uid 500); 24 Jul 2015 12:24:01 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 84268 invoked by uid 99); 24 Jul 2015 12:24:01 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2015 12:24:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 05D8518E5B1 for ; Fri, 24 Jul 2015 12:24:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.011 X-Spam-Level: X-Spam-Status: No, score=-0.011 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zjyLl29Eaxet for ; Fri, 24 Jul 2015 12:23:56 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 1618947BE9 for ; Fri, 24 Jul 2015 12:23:56 +0000 (UTC) Received: from [192.168.1.42] (unknown [5.10.171.186]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 20A9915A0399 for ; Fri, 24 Jul 2015 14:23:49 +0200 (CEST) From: Stefan Eissing Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Protocols directive, NEW Message-Id: Date: Fri, 24 Jul 2015 14:23:48 +0200 To: dev@httpd.apache.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) X-Mailer: Apple Mail (2.2102) 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 bytes GmbH Hafenweg 16, 48155 M=C3=BCnster, Germany Phone: +49 251 2807760. Amtsgericht M=C3=BCnster: HRB5782