Author: rhuijben
Date: Fri Dec  4 21:35:11 2015
New Revision: 1718038

URL: http://svn.apache.org/viewvc?rev=1718038&view=rev
Log:
Fix decoding of window-frame update frames. Use all bytes in the right
location instead of ignoring one byte and using another one twice.

* protocols/http2_protocol.c
  (http2_handle_stream_window_update,
   http2_handle_connection_window_update):
      Fix decoding and a typo in the logging.

Modified:
    serf/trunk/protocols/http2_protocol.c

Modified: serf/trunk/protocols/http2_protocol.c
URL: 
http://svn.apache.org/viewvc/serf/trunk/protocols/http2_protocol.c?rev=1718038&r1=1718037&r2=1718038&view=diff
==============================================================================
--- serf/trunk/protocols/http2_protocol.c (original)
+++ serf/trunk/protocols/http2_protocol.c Fri Dec  4 21:35:11 2015
@@ -619,7 +619,7 @@ http2_handle_stream_window_update(void *
     window_update = (const void *)data;
 
     value = (window_update->v3 << 24) | (window_update->v2 << 16)
-        | (window_update->v2 << 8) | window_update->v0;
+        | (window_update->v1 << 8) | window_update->v0;
 
     value &= HTTP2_WINDOW_MAX_ALLOWED; /* The highest bit is reserved */
 
@@ -647,7 +647,7 @@ http2_handle_stream_window_update(void *
     }
 
     serf__log(LOGLVL_INFO, SERF_LOGHTTP2, stream->h2->config,
-              "Increasing window on frame %d with 0x%x to 0x%x\n",
+              "Increasing window on stream %d with 0x%x to 0x%x\n",
               stream->streamid, value, stream->lr_window);
 
     return APR_SUCCESS;
@@ -677,7 +677,7 @@ http2_handle_connection_window_update(vo
     window_update = (const void *)data;
 
     value = (window_update->v3 << 24) | (window_update->v2 << 16)
-        | (window_update->v2 << 8) | window_update->v0;
+        | (window_update->v1 << 8) | window_update->v0;
 
     value &= HTTP2_WINDOW_MAX_ALLOWED; /* The highest bit is reserved */
 


Reply via email to