]> granicus.if.org Git - apache/commitdiff
updated documenation, fixed includes to work with older apr versions
authorStefan Eissing <icing@apache.org>
Thu, 19 Nov 2015 16:24:31 +0000 (16:24 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 19 Nov 2015 16:24:31 +0000 (16:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715209 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_http2.xml
modules/http2/h2_mplx.c

index da0a6b693e067843523c44798661d2d874ffa046..ae907a54128f44ec29c438def5b7c14e34b7c74e 100644 (file)
@@ -57,7 +57,7 @@
         <name>H2Direct</name>
         <description>H2 Direct Protocol Switch</description>
         <syntax>H2Direct on|off</syntax>
-        <default>H2Direct on for http:, off for https: requests</default>
+        <default>H2Direct on for h2c, off for h2 protocol</default>
         <contextlist>
             <context>server config</context>
             <context>virtual host</context>
                 use on TLS connections not mandated by the standard.
             </p>
             <p>
-                This mode only has an effect when h2 or h2c is enabled via
-                the <directive module="core" type="section">Protocols</directive>.
+                When a server/vhost does not have h2 or h2c enabled via
+                <directive module="core" type="section">Protocols</directive>,
+                the connection is never inspected for a HTTP/2 preamble. H2Direct
+                does not matter then. This is important for connections that
+                use protocols where an initial read might hang indefinitely, such
+                as NNTP.
+            </p>
+            <p>
+                For clients that have out-of-band knowledge about a server
+                supporting h2c, direct HTTP/2 saves the client from having to
+                perform an HTTP/1.1 upgrade, resulting in better performance
+                and avoiding the Upgrade restrictions on request bodies.
+            </p>
+            <p>
+                This makes direct h2c attractive for server to server communication
+                as well, when the connection can be trusted or is secured by other means.
             </p>
             <example><title>Example</title>
                 <highlight language="config">
         <name>H2Upgrade</name>
         <description>H2 Upgrade Protocol Switch</description>
         <syntax>H2Upgrade on|off</syntax>
-        <default>H2Upgrade on for http:, off for https: requests</default>
+        <default>H2Upgrade on for h2c, off for h2 protocol</default>
         <contextlist>
             <context>server config</context>
             <context>virtual host</context>
             </p>
             <p>
                 This method of protocol switching is enabled by default on cleartext
-                (http:) connections and disabled on TLS (https:), as mandated
-                by RFC 7540. 
+                (potential h2c) connections and disabled on TLS (potential h2), 
+                as mandated by RFC 7540. 
+            </p>
+            <p>
+                Please be aware that Upgrades are only accepted for requests
+                that carry no body. POSTs and PUTs with content will never
+                trigger an upgrade to HTTP/2. 
+                See <directive type="section">H2Direct</directive> for an 
+                alternative to Upgrade.
             </p>
             <p>
                 This mode only has an effect when h2 or h2c is enabled via
index 8c38bccdc9e59be787478be80afdada34133fbc8..3908590985a52b1eac82315f058c4808b9132b17 100644 (file)
@@ -16,6 +16,7 @@
 #include <assert.h>
 #include <stddef.h>
 
+#include <apr_atomic.h>
 #include <apr_thread_mutex.h>
 #include <apr_thread_cond.h>
 #include <apr_strings.h>