Nils Berghs (TELETASK) wrote:
Hello,
I have a problem with HttpUrlConnection (using JamVM).
I’ve made a simple program which creates a HttpUrlConnection from a URL,
opens the connection (using openConnection()), sets some properties and
than calls connect on the httpUrlConnection.
When I test this om my PC (using the normal Sun virtual machine) is
works perfectly. However when I try this on an embedded system using
JamVM it runs until the connect() method but this method does not
return. (eventually I get an IOException indicating that the remote host
has closed the connection).
With a network sniffing tool I took a look at the bytes being sent and
when I compare the PC and the embedded communication it seems that from
the embedded system the connection is made but instead of returning, the
connect() starts sending some data (http headers) and then stops (i think).
I found an old thread on this mailing list
(http://www.archivum.info/classpath@xxxxxxx/2005-09/msg00047.html) but
it talks about the problem (not specific jamVM) but does not really
offer a solution.
The amount of data that needs to be send is small (less than 1k) so that
should not be a problem.
The classpath version is 0.91, the jamVM 1.4.3.
Anybody a solution?
Try with current versions of classpath and jamVM. If the problem
persists, file a bug report.
David Daney