I have developed an application for a properitary stock trading system, where the protocol is based on sending long HTTP gets to a server (on port 80 to pass firewalls etc.)
My application/MIDlet runs successfully on P800 and the Nokia emulator, however on the 3650 i am not able to request long URLs.
In my connection thread the following code is issued:
String command = <my command>
HttpConnection coonection = (HttpConnection)Connector.open( command, Connector.READ );
connection.setRequestProperty( HttpConnection.GET );
connection.setRequestProperty( "Connection", "close" );
InputStream is = connection.openInputStream();
connection.close();
while ( (int ch = is.read()) != -1 ) {
// process
}
With a short url (~60 chars) this works as excepted, however with a long url (~600 chars) nothing happens, and the request does not make it through to the server.
The thread just hangs there, no exception etc.
Is this a known limitation or a bug? Will changing to POST help? Will a new revision of the firmware fix this? It this documented anywhere (officially or unofficially)?
(The server can be updated to accept HTTP posts, but currently do not support it. I don`t want to spend time on it if it will not work.)
--
Regards Johan Seland
Programmer Net Fonds ASA

Reply With Quote

