Implementing HTTP/2 client using python 3.5 hyper library
<p>Im trying to implement my own HTTP/2 client using python3.5 hyper library. Everything seems to work fine until I request objects larger than 64Kb.</p>

<p>I've already set the <code>network_buffer_size</code> in larger values than the default which is actually 64K, even set the library code to set the network_buffer_size big enough so it could process the response but still the amount of data received from server is 64K no matter how big the file is. </p>

<pre><code>conn = hyper.HTTP20Connection(SERVER, int(sys.argv[2]), True, window_manager=FlowControlManagerUs, enable_push=False, ssl_context=ssl_context)
conn.network_buffer_size = 256000
conn.connect()
</code></pre>

<p>And here's where I get the request:</p>

<p>resp = conn.get_response(strid)</p>

<p>data = resp.read()</p>

<p>I've implemented the FlowControlManager just setting initial_window_size to large value.</p>

<p>Thanks</p>

<p>Flow-control in HTTP/2 is implemented via two type of flow control windows: one for the connection, and one for each stream, in the words of <a href="https://tools.ietf.org/html/rfc7540#section-5.2" rel="nofollow">RFC 7540, 5.2 Flow control</a>: </p>

<blockquote>
  <p>A flow-control scheme ensures that streams on the same connection do
  not destructively interfere with each other.  Flow control is used for
  both individual streams and for the connection as a whole.</p>
</blockquote>

<p>hyper allows to implement your own flow control policy by sub classing <code>hyper.http20.window.BaseFlowControlManager</code>. By setting <code>initial_window_size</code> to large value, you've set the <strong>connection window</strong> to a large value. The stream window however is left unchanged, and it turns out that the default value for the stream window <em>is</em> 64 kb, from section <a href="https://tools.ietf.org/html/rfc7540#section-5.2.1" rel="nofollow">5.2.1 Flow-Control Principles</a>:</p>

<blockquote>
  <ol start="4">
  <li>The initial value for the flow-control window is 65,535 octets
     for both new streams and the overall connection.</li>
  </ol>
</blockquote>

<p>In order to increase the window for the stream, you'll have to also implement the <code>increase_window_size</code> method of the flow-control manager.</p>

python http2 hyper