cURL / Mailing Lists / curl-library / Single Mail

curl-library

How to send a file in a single HTTP POST request using CURL library

From: harsh poshtiwala <hiharsh_at_gmail.com>
Date: Wed, 23 Jul 2008 22:59:10 -0400

Hi Friends,

I have been trying to upload a file using HTTP POST request. Using a
socket or CURL library.
I have different issues with each one.

I have a clilent code

I have a client code I want to send the file Using Socket I found following

1) HTTP POST AND HTTP GET request over ETHERNET works 100% fine.
2) HTTP GET request over GPRS works fine.
3) HTTP POST request over GPRS doesn't work.(Even request doesn't
reach to the server).

I tried most of the debugging. The only difference in HTTP GET and
HTTP POST request is the size of the data.

I know that my cmux protocol (gsm0710) doesn't allow to transmit more
than 255 bytes at one shot.

Now with the CURL library

I was trying to send the data using curlPost in the chunks of 255
bytes, but the issue is that every time it sends a HTTP header. (which
is a part of curlPost function itself , Base URL)

I would like to send entire file with only one HTTP header. How can i
achieve this ? Again CMUX protocol doesn't allow me to UPLOAD data
greater than 255 bytes in a single transmit.

Where should I make change in the curl Library to achieve this ?
Received on 2008-07-24