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  




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