BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   setRequestProperty Content-Length don't work (http://www.blackberryforums.com/showthread.php?t=612)

fabius 09-21-2004 12:01 PM

setRequestProperty Content-Length don't work
 
Hi,

in my code set connection content-length
by

c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("User-Agent", "BlackBerry/3.2.1");
c.setRequestProperty("Content-Language", "en-US");
c.setRequestProperty("Content-Length", String.valueOf(length));

and write in outputStream
by

byte[] requestArray = request.getBytes();
for (int i = 0, l=requestArray.length; i < l; i++) {
os.write(requestArray[i]);
}

but if requestArray is too large, write operation fails!

Why?
c.setRequestProperty("Content-Length"... works in 7230 Handheld?

Thanks for any suggestion.
fabius

eradis 09-21-2004 08:17 PM

If it works on the 7230 it should work? Are you trying this on a real device? What model is it not working on?


All times are GMT -5. The time now is 05:14 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.