This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

malformed response header  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i'm constructing my MIDlet as a client with a J2SE application acting as a "web server". it accepts http requests and send an http response to the MIDlet. i'm constructing my own http header on the server, and then send it to the MIDlet. the first time it ran, it went well. but on second and more tries, my MIDlet always generates the "malformed response message" error. i suspect this is because there are some bytes left on the stream and/or connection, but i have closed them all in my finally{}, and it still doesn't work. can anyone help me?
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
perhaps running the midlet against a properly configured servlet would help since this would point out whether the fault lies with the response headers or your midlet?
 
yoga nandiwardhana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think the problem is not in the header, because on the first try it worked alright. i catched and printed the port, response message, and length, and it's shown right.
could the problem somehow be in the input/outputstream and/or connections?
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!