]> granicus.if.org Git - curl/commitdiff
http2 push: set weight for new stream
authorDaniel Stenberg <daniel@haxx.se>
Sun, 29 Nov 2015 23:10:35 +0000 (00:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 29 Nov 2015 23:10:35 +0000 (00:10 +0100)
give the new stream the old one's stream_weight internally to avoid
sending a PRIORITY frame unless asked for it

lib/http2.c

index 246b64ac59f9a6d63b17f929b8bc6f28454846cc..877328207177038f7227493aa4a3d37182997e68 100644 (file)
@@ -310,8 +310,10 @@ static CURL *duphandle(struct SessionHandle *data)
         (void)Curl_close(second);
         second = NULL;
       }
-      else
+      else {
         Curl_http2_setup_req(second);
+        second->state.stream_weight = data->state.stream_weight;
+      }
     }
   }
   return second;