You Are Here:

Community: Developer Discussion Boards

#1 Old HTTP Connection on a Nokia 3650 - is it possible at all? - 2003-04-25, 00:34

Join Date: Apr 2003
Posts: 1
gemilov
Offline
Registered User
I have a Nokia 3650 device from Cingular and I can not run my network aware application on it. My plan includes GPRS data, and I am able to send MMS content to E-Mail accounts.
I created a really simple application in order to trace the problem, and I still get the same problem. The sample application is:

HttpConnection c = null;
InputStream is = null;
try {
c = (HttpConnection)Connector.open("http://www.sun.com", Connector.READ);
is = c.openInputStream(); //<< Here I get a NullPointerException.
...

I am getting a NullPointerException when I try to open the input stream. The strange thing is that the exception is thrown almost immediately, like the device does not even try to reach the server.

Both my application and the sample run perfectly on the Nokia 3650 simulator.

So my question is what could be the problem and how can I avoid it?
Reply With Quote

#2 Old 2003-04-25, 17:43

Join Date: Mar 2003
Posts: 1
laurent_sobrie
Offline
Registered User
Hi everybody,

I've got the same problem as you. The same symptoms appears on the phone but not on the emulator.

One indication on the server (a classical tomcat) is that the connection established is of type http 1.0 !!! I read everywhere that the midp1.0 requires the version http 1.1 I tested my application with others phones(Siemens and SonyErricson) and all is working well and the connections established are of type http1.1

Is there someone that can provide me the info about the exact protocol used on the 3650?

Thanks

Laurent
Reply With Quote

#3 Old 2003-05-07, 19:39

Join Date: Mar 2003
Posts: 1
draczula
Offline
Registered User
I found that the bug is apparently in the URL parsing. It seems there must be a trailing slash after the hostname when the path is empty. So in your example, try using the url:
"http://www.sun.com/"
instead of:
"http://www.sun.com"
This is a bug because the HTTP spec states that the two URLs are equivalent.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia