Link to home
Start Free TrialLog in
Avatar of deem1
deem1

asked on

Using XMLHTTP to post data, size limit hit.

I'm using the XMLHTTP object to post data from a PocketPC 2002 handheld to a web server. The problem I am having is that there seems to be a limit on the size of data that can be posted this way. Using this code:

Dim xHttp as object
Dim sendStr as string

sendString = FunctionToGetSendString() '' located elsewhere

Set xHTTP = CreateObject("Microsoft.XMLHTTP")

xHTTP.open "POST", "http://mywebserver/mypage.asp", False

xHTTP.send  sendString


This works fine most of the time, only when the sendString gets larger than +-1500 bytes does it start to crash. Also, it only happens when I'm dialled up on a modem, if I run this program while the device is placed in the cradle using the host's internet connect there is not limit on the length of the sendString... This is all very weird.. any help appreciated.
Avatar of joao_patrao
joao_patrao

You are right.
I experimented the same problem and the maximum size of info that i could post was around 1500 bytes. You have a limitation on GET of 256 bytes, but i never saw info about limits on POST...

If you want to send more information, you need to parse the data into separate POST and then reconstruct on the server(destination) side.

I tested this in some projects already to send around 200K of information to the backoffice, with sucess.

Hope it helps...

Best Regards
Joao Patrao
Avatar of deem1

ASKER

I tested, the exact limit is 1420 bytes. I've rewritten my software to split large data into smaller pieces of this size, but the ideal is to get the thing to work as it was supposed to :-(
ASKER CERTIFIED SOLUTION
Avatar of joao_patrao
joao_patrao

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial