SPDY: improved debug logging of inflate() calls.
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
index 010b803..ae95efd 100644
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -1065,16 +1065,16 @@
                                     : Z_OK;
     }
 
-    if (z != Z_OK) {
-        return ngx_http_spdy_state_inflate_error(sc, z);
-    }
-
     ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
                    sc->zstream_in.next_in, sc->zstream_in.next_out,
                    sc->zstream_in.avail_in, sc->zstream_in.avail_out,
                    z);
 
+    if (z != Z_OK) {
+        return ngx_http_spdy_state_inflate_error(sc, z);
+    }
+
     sc->length -= sc->zstream_in.next_in - pos;
     pos = sc->zstream_in.next_in;
 
@@ -1164,6 +1164,12 @@
 
                 z = inflate(&sc->zstream_in, Z_NO_FLUSH);
 
+                ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+                           "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
+                           sc->zstream_in.next_in, sc->zstream_in.next_out,
+                           sc->zstream_in.avail_in, sc->zstream_in.avail_out,
+                           z);
+
                 if (z != Z_OK) {
                     return ngx_http_spdy_state_inflate_error(sc, z);
                 }
@@ -1265,6 +1271,12 @@
 
         n = inflate(&sc->zstream_in, Z_NO_FLUSH);
 
+        ngx_log_debug5(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
+                       "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
+                       sc->zstream_in.next_in, sc->zstream_in.next_out,
+                       sc->zstream_in.avail_in, sc->zstream_in.avail_out,
+                       n);
+
         if (n != Z_OK) {
             return ngx_http_spdy_state_inflate_error(sc, n);
         }