title: Netty 4.0 SPDY file transfer not working
body: <p>For a long time I always run into the same trouble when i try to use SPDY with netty. </p>
  
  <p>I checked different SPDY sources to setup my SPDY server. So far it works fine and I have got a pure html output in my browser. Chrome also shows an spdy session.</p>
  
  <p><strong>Issue</strong></p>
  
  <p>When i put the netty 4 <code>HttpStaticFileServerHandler</code> example class to the <code>SPDYorHTTPHandler</code> I always run into the same problem.</p>
  
  <p>HTML content is sent, but the file content isn't. The handler is sending the response so my client retrieves, but then the files are never transmitted.</p>
  
  <p>Any ideas about that?</p>
  
  <p><code>ctx.write(response)</code> is writing the response to the client (response is a <code>HttpResponse</code> obj).</p>
  
  <p>In the next line:(<code>raf=RandomAccessFile</code>)</p>
  
  <pre><code>ChannelFuture sendFileFuture;
      if (useSendFile) {
          sendFileFuture = ctx.write(new DefaultFileRegion(raf.getChannel(), 0, fileLength), ctx.newProgressivePromise());
      } else {
          sendFileFuture = ctx.write(new ChunkedFile(raf, 0, fileLength, 8192), ctx.newProgressivePromise());
      }
  </code></pre>
  
  <p>But it never gets written. The code based 100% on the <code>HttpStaticFileServerHandler</code> example and the SPDY example of netty 4.</p>
  
  <p>I just changed the <code>createHttpRequestHandlerForHttp output</code> from <code>SpdyServerHandler</code> to <code>HttpStaticFileServerHandler</code>.</p>
  
  <p>This is the pileline I use:</p>
  
  <pre><code>    ChannelPipeline pipeline = ctx.pipeline();
      pipeline.addLast("spdyFrameCodec", new SpdyFrameCodec(version));
      pipeline.addLast("spdySessionHandler", new SpdySessionHandler(version,true));
      pipeline.addLast("spdyHttpEncoder", new SpdyHttpEncoder(version));
      pipeline.addLast("spdyHttpDecoder", new SpdyHttpDecoder(version, MAX_CONTENT_LENGTH));
      pipeline.addLast("spdyStreamIdHandler", new SpdyHttpResponseStreamIdHandler());
      pipeline.addLast("chunkedWriter", new ChunkedWriteHandler());
      pipeline.addLast("httpRequestHandler",new HttpStaticFileServerHandler());
  </code></pre>
  
  <p>If you need more code for that, just write, I will extend the Post.</p>
  
  <p>I got no errors, warnings or something else. </p>
  
  <p>A <code>ChannelProgressiveFutureListener</code> did never call <code>operationProgressed</code> function.</p>
  
  <p>Thx dodo.</p>