Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Maximum size of HTTP Post - AddPostKey

$
0
0
Re: Maximum size of HTTP Post - AddPostKey
West Wind Internet Protocols
Re: Maximum size of HTTP Post - AddPostKey
01/04/2012
10:27:24 AM
3EG0MEVKF Show this entire thread in new window
From:
To:
Attachments:
None
Rick,

Can you help me understand your "(files uploaded can be larger)" below? In our desktop software I've got some code to send a file through http, but if it's over a certain size it bombs. It's not an IIS thing in this case, it happens during the 'addpostkey' method when it's doing the:

THIS.cPostBuffer = THIS.cPostBuffer + ;
"--" + MULTIPART_BOUNDARY + CR + ;
[Content-Disposition: form-data; name="]+tcKey+["; filename="] + tcValue + ["]+CR+CR+;
FILETOSTR(tcValue) + CR

Obviously, filetostr has a limit of 16mb and strangely it does convert to a string, but when it's added to another, a 'string too long' error comes up.

Maybe I'm missing something here. What are my options for sending a file > 16mb?

Sample code of mind:
...
.ohttp.nHTTPPostMode = 2
.ohttp.addpostkey("lmscode",GenerateLMSWebSecurityString())
.oHttp.AddPostKey("File",m.cPathFile,.T.)
IF ! .HTTPGet("FileUpload.acs","",.t.)
...

Thanks,
Sean


Javier,

It sounds like this is a SERVER error not a client error, and you really have no control over this from client code. I suspect the server has a limit on the size of POST data allowed to be posted to the server. Most servers have this configurable. You might also be bumping up against a server request timeout if the upload takes too long and goes beyond the server's request timeout. ALl of these are server configuration issues though, and you can't control these from the client. wwHttp just sends the data, the server has to receive it and process it.

There's no reason that this should not work from the wwHttp end of things. You should be able to send strings and files up to the size of VFP's string limit at 15 megabytes (files uploaded can be larger)

Hope this helps,

+++ RIck ---


Hi, I'm using wwIPSTuff to post data to a Web Server using the AddPostKey() method. All works fine, but, right now I have a problem when the data is too big.

The method works fine with small data, but when I try to send like 3-5 MB I get error 500 - Server Error.

How can I indicate the maximum size of the Post??

Best Regards.
Javier Leal.





HTML Help Builder

Viewing all articles
Browse latest Browse all 10393

Trending Articles