BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-10-2008, 09:20 PM   #1 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Mar 2005
Model: 9000
Carrier: ATT
Posts: 247
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default HttpConnection Issue - MLBTracker

Please Login to Remove!

Hi,

Something mysteriously broke in my MLBTracker app and I'm stuck trying to fix it. Sometime recently the URL I connect to changed the data being returned (as I can see from wget). Basically a lot of newline characters were added to the beginning of the response stream.

Now via the BB and from the simulator, I can see that the URL only returns 12 \n (newline) chars and then the stream ends. Even though I know if I do a wget on the same URL I get a lot of data after the newline chars.

Any ideas?
__________________
theSUGGESTR.com | BB on Fire
Offline  
Old 07-10-2008, 10:08 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Mar 2005
Model: 9000
Carrier: ATT
Posts: 247
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure if its the issue but I noticed that the response itself is coming with a transfer-encoding of chunked. Does the blackberry HttpConnection / InputStream handle the chunked transfer encodings?
__________________
theSUGGESTR.com | BB on Fire
Offline  
Old 07-11-2008, 01:51 PM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Mar 2005
Model: 9000
Carrier: ATT
Posts: 247
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quick Update:

I was able to fix the original issue by adding:

c.setRequestProperty("User-Agent","BlackBerry8320/4.2.2");

To my connection.

However now I'm finding that when connecting using BES I get lots of binary chars where when I use the WAP gateway settings things work ok... Any ideas?
__________________
theSUGGESTR.com | BB on Fire
Offline  
Old 07-24-2008, 12:45 PM   #4 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8100
PIN: N/A
Carrier: AT&T
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi fsa3,

Do you know if BlackBerry's HttpConnection support "transfer-encoding: Chunked" header? When I set the header, it seems to me "Content-lenght" header always internally added.
Offline  
Closed Thread


Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

USA Blackberry Unlock Code AT&T SQN100 1 Clean imei only
$1.79
USA Blackberry Unlock Code AT&T SQN100 1 Clean imei only pictureBLACKBERRY AT&T USA UNLOCK CODEQ5 9790 Q5 Q10 ETC ONLY OUT OF CONTRACT SUPPORTED
$1.79
BLACKBERRY AT&T USA UNLOCK CODEQ5 9790 Q5 Q10 ETC ONLY OUT OF CONTRACT SUPPORTED pictureBlackBerry Unlock Code Q10 Z30 AT&T USA att Clean imei only
$4.99
BlackBerry Unlock Code Q10 Z30 AT&T USA att Clean imei only pictureUnlock Code BlackBerry AT&T USA Blackberry Torch 9810 Clean imei only
$1.79
Unlock Code BlackBerry AT&T USA Blackberry Torch 9810 Clean imei only pictureUSA Blackberry Unlock Code AT&T SQN100 1,Z10 Clean imei only
$1.79
USA Blackberry Unlock Code AT&T SQN100 1,Z10 Clean imei only picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.