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

Professional Ultra SanDisk 64GB MicroSDXC Card for BlackBerry Q10 Smartphone is
$35.31
Professional Ultra SanDisk 64GB MicroSDXC Card for BlackBerry Q10 Smartphone is pictureBLACKBERRY UNLOCK CODE - ALL MODELS LOCKED TO AT&T
$0.1
BLACKBERRY UNLOCK CODE - ALL MODELS LOCKED TO AT&T picture6FT Micro HDMI to HDMI Cable type d 1080P BLACKBERRY HTC DROID EVO 4G FEET FOOT
$3.81
6FT Micro HDMI to HDMI Cable type d 1080P BLACKBERRY HTC DROID EVO 4G FEET FOOT pictureComplianceSigns Vertical Plastic OSHA NOTICE No Cell Phones, Blackberrys Sign, 1
$7.0
ComplianceSigns Vertical Plastic OSHA NOTICE No Cell Phones, Blackberrys Sign, 1 pictureBlackBerry Bold 9900 - 8GB - Black...AT&T... Smartphone Clean IMEI/ESN...USED
$34.0
BlackBerry Bold 9900 - 8GB - Black...AT&T... Smartphone Clean IMEI/ESN...USED picture






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