tags:

views:

70

answers:

1

i am doing a simple http request to the server and server is returning 0 problem is that

on simulator i am getting "0" (expected)

and on real device i am getting "text/html ||||| |||||, <|||||0" (unwanted response)

am i missing something?

A: 

That depends. Are you accessing the HTTP server via BES or BIS? If so then you need to be aware that the device does not actually establish an HTTP connection to the server, the BES or BIS does that on behalf of the device. It does some other helpful things that may not be expected.

Richard
No i am not accessing http server via BES or BIS.
Vivart
Hmm, so you have appended ;deviceSide=true to your connection URL? Posting some code might help.
Richard
i am just using http connection code given in api doc. but the only difference is user agent when i am using c.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");i am getting nulland when i am not using any user agent i am getting text/html ||||| |||||, <|||||0. @richard i am using right connection.
Vivart
can you show what HTTP headers are being sent back by the server?
Remy Lebeau - TeamB