views:

215

answers:

1

So, I have a Blackberry 9000 application doing simple networking using HttpConnection. Everything works fine normally, when I go to urls of the form:

http://url.com

But I've discovered that I need to test this in wifi only situations (that is, without a BES or equivalent in sight). After some digging, I discovered that I need to add:

;interface=wifi

To all of my URLS, of the form:

http://url.com;interface=wifi

However, I'm noticing that this does not actually work, it gives me back a HTTP error 406. Which according to wiki is a:

406 Not Acceptable The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.[2]

Am I doing something completely wrong? Does Blackberry wrap wifi only requests in headers that require particularly formatted websites?

+1  A: 

As explained on this page, you also need add "deviceside=true" to the URL.

To specify that the underlying TCP connection should be opened directly from the handheld, set this parameter to "true". Specify "deviceside=false" when receiving or sending data through the BlackBerry MDS Connection Service.

So your full URL would be:

http://url.com;interface=wifi;deviceside=true
Ben S