Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

content-length property in wireless toolkit

 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to test the HTTP network functionality in one of my applications. This functionality works on most phones with the exception of some Sony Ericsson models. I downloaded the Wireless Toolkit to test this HTTP functionality using the "Network Monitor" feature in this SDK. When I run the HTTP POST in my MIDlet, I receive the following message from the server:
HTTP/1.1 411 Length Required

All of the above HTTP header properties appear in the network monitor screen with the exeption of 'content-length' which does not seem to work.
Any suggestions would be greatly appreciated.
Thanks!
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which server are you using? Tomcat? Apache? Can you intercept the request at the server end and see if the "Content-length" header is there? I have the feeling that the server is reporting a wrong error message.
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,
We use an outside hosting company, PHPWebHosting.com . Could you explain how we could intercept the packet on the server side as you mentioned?
Please note that the same jar/jad files worked correctly on a Nokia phone using the T-Mobile network. With that said, it seems that it is either the specific phone or the emulator that is causing this issue.
Thanks so much for your help!
Greg
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if you control the server, you can attach a network monitor and see exactly what it receives from the client. My guess is that T-Mobile did not like the headers sent by your SE and somehow altered the HTTP request in a non-standard way. That triggered the abnormal server response. After all, 411 error is very rare.
To understand this properly, you need to intercept the traffic at socket level. I would suggest you to replace that remote IP with a server that you have control of. Then you can see what exactly is passed from the network. Please post back when you have solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic