rschildmeijer / deft

High performance non blocking web framework
http://www.deftserver.org
Apache License 2.0
197 stars 25 forks source link

Support for "Transfer-Encoding: chunked" in AsynchronousHttpClient #116

Closed rschildmeijer closed 13 years ago

rschildmeijer commented 13 years ago

http://en.wikipedia.org/wiki/Chunked_transfer_encoding http://www.jmarshall.com/easy/http/#http1.1c2

rschildmeijer commented 13 years ago

http://weblog.rubyonrails.org/2011/4/18/why-http-streaming

rschildmeijer commented 13 years ago

client fetch "http://sunet.se/" (good candidate to test Transfer-Encoding: chunked on) produces the following stacktrace (due to lack of chunked support):

Exception in thread "I/O-LOOP" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:417) at java.lang.Integer.parseInt(Integer.java:499) at org.deftserver.web.http.client.AsynchronousHttpClient.onHeaders(AsynchronousHttpClient.java:180) at org.deftserver.web.http.client.AsynchronousHttpClient.access$5(AsynchronousHttpClient.java:170) at org.deftserver.web.http.client.AsynchronousHttpClient$4.onSuccess(AsynchronousHttpClient.java:166) at org.deftserver.web.http.client.AsynchronousHttpClient$4.onSuccess(AsynchronousHttpClient.java:1) at org.deftserver.io.AsynchronousSocket.invokeReadSuccessfulCallback(AsynchronousSocket.java:199) at org.deftserver.io.AsynchronousSocket.checkReadState(AsynchronousSocket.java:186) at org.deftserver.io.AsynchronousSocket.handleRead(AsynchronousSocket.java:136) at org.deftserver.io.IOLoop.start(IOLoop.java:84) at org.deftserver.example.AsynchronousHttpClientExample.main(AsynchronousHttpClientExample.java:28)