4

I spend three days in find out how I can connect to an https chunked push servlet and get an inputstream. The connection with HttpsURLConnection works and also with HttpClient but in every programmed code, when I try to get the InputStream of this servlet, this line blocks! No error, no exception, nothing. The debugger only stops at this line and wait.

I know that there is no Content-Length in the Header of the servlet and I know that this was the reason why the method getInputStream of URLConnection blocks.

But now I have no other Idea. Is there anyone who can help me to get this InputStream from the servlet? All connections are fine with HttpsURLConnection and HTTPClient only getting the InputStream Fails and I don't know why.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Informatic0re
  • 6,300
  • 5
  • 41
  • 56

1 Answers1

1

The problem is solved! Epic Fail: befor i connect to the servlet to get the response i have to connect to another servlet to start the session, than save the cookie and go on. i Used HttpsURLConnection and it works quiet good... Fazit: Streaming works well on Android

Informatic0re
  • 6,300
  • 5
  • 41
  • 56
  • Mirko - can you share the code snippet? I am having the same problem in my Android code, but I don't see how starting another servlet helps the problem generically. I am in search of an Epic Fix :) – mobibob Feb 20 '11 at 18:12
  • Hey mobibob - the problem was, that there was another servlet i had to start first. The problem was only on the Serversite. Do you need to login or something first? You need a session at first, befor you can get the stream. – Informatic0re Jun 01 '11 at 08:12