I have a nice problem for the J2ME network developer experts.
I have a midlet running on a Nokia 6310i that opens an HTTP connection to a server and makes a couple of POST requests. The URL is retrieved by a configuration parameter in the jad and is something like http://<hostname>/cgi-bin/acgi.
Than I have two different servers, one is resolvable by name (www.funambol.com) and the other one is only know by IP address.
If I connect to the server with the hostname, everything works right. But if I try to connect to the second server, via its IP address I have a very strange behaviour. The server seems not to be contacted, but the code of the midlet is getting something from the connection, but meaningless content. Here are the first bytes received (bytes separated by '-'):
Here is the code snipped I use to make the request: