Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 16
Registered: ‎05-04-2010
My Device: RIM Bold9700
My Carrier: Nextel

Http response size limit?

Hi All,


i have a web service which returns me with some JSON response.

if the json resonse size is large device/simulator doesnt receive any data.

this issue comes only in blackberry 5.0 OS. When I run it on 4.7 OS devices it runs smooth.


would be of great help if anyone of you can provide with some positive inputs.

also want to know is their some size limit on http response?




Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Http response size limit?

There is indeed a size limit on http responses. It varies depending on the connection route (whether it goes through MDS or BIS, what the server settings are, whether transcoding is taking place, and possibly other factors). If you hit that limit, you will get a 413 http response code. See this knowledge base article for more information. Be aware that in practice, you can see 413 errors with much smaller responses from the server than are stated in that article. Others on this forum have advised limiting responses to 64K to be safe.


If this is a problem, there are several common approaches, not all of which may be viable for your particular situation:

  1. Try to reduce the size of the response. It is very easy to use gzip compression and decompression on BBs, so consider running the response through gzip with maximum compression on the server. JSON should compress nicely.
  2. Try to suppress transcoding by including a "x-rim-transcode-content: none" header in both the request and the response. RIM's transcoding can inflate the byte count of a response by a sizeable factor.
  3. Redesign your server interactions so responses are smaller, perhaps at the expense of making more connections.
  4. Support range retrieval requests. This can be complicated and in the case of dynamic responses may require caching the response at the server as well as in the device. It also comes at the expense of more connections.

Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
New Contributor
Posts: 2
Registered: ‎11-04-2010
My Device: Not Specified

Re: Http response size limit?

[ Edited ]

Hello, can you please send me the code to receive JSON response from web service in blackberry 4.7. I am trying that for some time now and by far unsuccessful.



Aditya Sharma