http - Netty 4.0 SPDY file transfer not working -



http - Netty 4.0 SPDY file transfer not working -

for long time run same problem when seek utilize spdy netty.

i checked different spdy sources setup spdy server. far works fine , have got pure html output in browser. chrome shows spdy session.

issue

when set netty 4 httpstaticfileserverhandler illustration class spdyorhttphandler run same problem.

html content sent, file content isn't. handler sending response client retrieves, files never transmitted.

any ideas that?

ctx.write(response) writing response client (response httpresponse obj).

in next line:(raf=randomaccessfile)

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()); }

but never gets written. code based 100% on httpstaticfileserverhandler illustration , spdy illustration of netty 4.

i changed createhttprequesthandlerforhttp output spdyserverhandler httpstaticfileserverhandler.

this pileline use:

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());

if need more code that, write, extend post.

i got no errors, warnings or else.

a channelprogressivefuturelistener did never phone call operationprogressed function.

thx dodo.

try use:

sendfilefuture = ctx.write(new httpchunkedinput(new chunkedfile(raf, 0, filelength, 8192)), ctx.newprogressivepromise());

file http netty spdy

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -