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 2A4A3185D6 for ; Wed, 16 Dec 2015 11:40:51 +0000 (UTC) Received: (qmail 4912 invoked by uid 500); 16 Dec 2015 11:40:45 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 4844 invoked by uid 500); 16 Dec 2015 11:40:45 -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 4834 invoked by uid 99); 16 Dec 2015 11:40:45 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2015 11:40:45 +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 3009A1804A5 for ; Wed, 16 Dec 2015 11:40:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.654 X-Spam-Level: X-Spam-Status: No, score=-0.654 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.554] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=JfccgJMx; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=XV7udZ7N Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HGFrxFi-v6kt for ; Wed, 16 Dec 2015 11:40:29 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 3A96D204B6 for ; Wed, 16 Dec 2015 11:40:28 +0000 (UTC) Received: by mail.greenbytes.de (Postfix, from userid 117) id 9AF8415A0C40; Wed, 16 Dec 2015 12:40:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1450266026; bh=4LhKbYYTMLIGLaOV1IJJGJXeSpsI5kw6CyW1w8efjs4=; h=From:Subject:Date:To:From; b=JfccgJMxdaYmEJIBKD0Uf2vtgQYo6bNo+ZC58JrzSEAY86Z4seBB10Uf7aMkmpvuT e5eCmvp092XOZdB9kK5lzqaIrbu65vXBTAdkHaDCsHWeShLxidvA98IN0B8irCmvd9 sStEWcikxc3QAxcFXWET2ICmkj4kuepQTdUw308s= Received: from [192.168.1.42] (unknown [217.91.35.233]) (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 B22B315A0638 for ; Wed, 16 Dec 2015 12:40:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1450266025; bh=4LhKbYYTMLIGLaOV1IJJGJXeSpsI5kw6CyW1w8efjs4=; h=From:Subject:Date:To:From; b=XV7udZ7Npl5WKaXHEdqxGVxHupMZkQNauBnu8aPKeW15W7J4RzWMabtlsbRIrLJlA iepLUE0NBHBAJ7S+kGf63/HIE05dHolt8kP+U2rwlJzI+8KF5WzmBciXZoczd1pCfn QKzZjnSFLOUrK4y6JwRMPSZl7OprBTJ0waZFYEdY= From: Stefan Eissing Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: variables Message-Id: <1A4A9DE8-ACF3-4FEB-BE4E-756E850ACF39@greenbytes.de> Date: Wed, 16 Dec 2015 12:40:25 +0100 To: dev@httpd.apache.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) I would like to expose some HTTP/2 properties, for example = "HTTP2=3Don|off" similar to what mod_ssl does with HTTPS and other SSL = variables. Current implementation does not look like something to = repeat, at first glance, but maybe it's the only way... The optional function ssl_is_https is used: - from many modules - server/util_expr_eval.c The optional function ssl_var_lookup is used: - from even more modules - *not* in server Subprocesses get their environment via r->subprocess_env, filled via the = "fixups" hook. This is the usual way how we involve modules in request = processing. But, as I read it, subprocess_env gets filled with all = variables for every request, even though they maybe never read? Hmm, = probably a little late to do anything about that without code breakage. So, the least work and most 2.4.x compatible way for mod_http2 is to = mimmic the mod_ssl way. http2_is_http2() and http2_var_lookup(), = optional. Add fixups hook for subprocess_env, add $HTTP2 handling to = server/util_expr_eval.c for checks in config/htaccess? //Stefan PS. For trunk, it might be a nice TODO to add a variable registry that = allows lazy evaluation. Like with struct ap_var_handler_t { const char *name; const char *lookup(struct ap_var_handler_t *h, server_rec *s, = conn_rec *c, request_rec *r); void *ctx; int server_specific :1; int conn_specific :1; int cacheable :1; int scope_config :1; int scope_subprocess :1; }