You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2015/12/07 16:22:11 UTC

svn commit: r1718400 - in /httpd/httpd/trunk: docs/manual/mod/mod_http2.xml modules/http2/h2_config.c modules/http2/h2_session.c modules/http2/h2_version.h

Author: icing
Date: Mon Dec  7 15:22:11 2015
New Revision: 1718400

URL: http://svn.apache.org/viewvc?rev=1718400&view=rev
Log:
removing weight from H2PushPriority with dependency 'before' as on stream close, priorities would not be as before otherwise

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_http2.xml
    httpd/httpd/trunk/modules/http2/h2_config.c
    httpd/httpd/trunk/modules/http2/h2_session.c
    httpd/httpd/trunk/modules/http2/h2_version.h

Modified: httpd/httpd/trunk/docs/manual/mod/mod_http2.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_http2.xml?rev=1718400&r1=1718399&r2=1718400&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_http2.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_http2.xml Mon Dec  7 15:22:11 2015
@@ -267,15 +267,15 @@
             </p>
             <example><title>Before Priority Rule</title>
                 <highlight language="config">
-                    H2PushPriority application/json Before 256
+                    H2PushPriority application/json Before
                 </highlight>
             </example>
             <p>
                 This says that any pushed stream of content type 'application/json'
                 should be send out <em>before</em> X. This makes P1 dependent
                 on Y and X dependent on P1. So, X will be stalled as long as
-                P1 has data to send. The effective weight is calculated as
-                in the interleaved case.
+                P1 has data to send. The effective weight is inherited from the
+                client stream. Specifying a weight is not allowed.
             </p>
             <p>
                 Be aware that the effect of priority specifications is limited
@@ -291,13 +291,13 @@
                 <li>'*' is the only special content-type that matches all others. 
                  'image/*' will not work.</li>
                 <li>The default dependency is 'After'. </li>
-                <li>There are also default weights: for 'After' it is 16, otherwise 256. 
+                <li>There are also default weights: for 'After' it is 16, 'interleaved' is 256. 
                 </li>
             </ol>
             <example><title>Shorter Priority Rules</title>
                 <highlight language="config">
 H2PushPriority application/json 32         # an After rule
-H2PushPriority image/jpeg before           # weight 256 default
+H2PushPriority image/jpeg before           # weight inherited
 H2PushPriority text/css   interleaved      # weight 256 default
                 </highlight>
             </example>

Modified: httpd/httpd/trunk/modules/http2/h2_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_config.c?rev=1718400&r1=1718399&r2=1718400&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_config.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_config.c Mon Dec  7 15:22:11 2015
@@ -429,7 +429,9 @@ static const char *h2_conf_add_push_prio
     } 
     else if (!strcasecmp("BEFORE", sdependency)) {
         dependency = H2_DEPENDANT_BEFORE;
-        sdefweight = "256";        /* default BEFORE weight */
+        if (sweight) {
+            return "dependecy 'Before' does not allow a weight";
+        }
     } 
     else if (!strcasecmp("INTERLEAVED", sdependency)) {
         dependency = H2_DEPENDANT_INTERLEAVED;

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1718400&r1=1718399&r2=1718400&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Mon Dec  7 15:22:11 2015
@@ -1396,11 +1396,12 @@ apr_status_t h2_session_set_prio(h2_sess
                 /* PUSHed stream os to be sent BEFORE the initiating stream.
                  * It gets the same weight as the initiating stream, replaces
                  * that stream in the dependency tree and has the initiating
-                 * stream as child with MAX_WEIGHT.
+                 * stream as child.
                  */
                 ptype = "BEFORE";
-                w_parent = nghttp2_stream_get_weight(s_parent);
+                w = w_parent = nghttp2_stream_get_weight(s_parent);
                 nghttp2_priority_spec_init(&ps, stream->id, w_parent, 0);
+                id_grandpa = nghttp2_stream_get_stream_id(s_grandpa);
                 rv = nghttp2_session_change_stream_priority(session->ngh2, id_parent, &ps);
                 if (rv < 0) {
                     ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
@@ -1409,8 +1410,6 @@ apr_status_t h2_session_set_prio(h2_sess
                                   session->id, id_parent, ps.weight, ps.stream_id, rv);
                     return APR_EGENERAL;
                 }
-                id_grandpa = nghttp2_stream_get_stream_id(s_grandpa);
-                w = valid_weight(w_parent * ((float)prio->weight / NGHTTP2_MAX_WEIGHT));
                 nghttp2_priority_spec_init(&ps, id_grandpa, w, 0);
                 break;
                 

Modified: httpd/httpd/trunk/modules/http2/h2_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_version.h?rev=1718400&r1=1718399&r2=1718400&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_version.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_version.h Mon Dec  7 15:22:11 2015
@@ -20,7 +20,7 @@
  * @macro
  * Version number of the h2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.0.11-DEV"
+#define MOD_HTTP2_VERSION "1.0.12-DEV"
 
 /**
  * @macro
@@ -28,7 +28,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x01000b
+#define MOD_HTTP2_VERSION_NUM 0x01000c
 
 
 #endif /* mod_h2_h2_version_h */