cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

RE: Login & FileUpload via HTTP POST faling - using curl_formadd

From: Krishna Murthy Gudipati <krishnamurthyg_at_infotechsw.com>
Date: Thu, 6 Nov 2008 20:11:51 +0530

Hello Daniel,

Thank you very much for the response.

The problem is solved. I was browsing thru your responses for file uploading
queries posted and you specified CURLFORM_FILE will indicate the file
upload. I was setting CURLFORM_FILECONTENT and when changed to CURLFORM_FILE
the file got uploaded.

Thank you very much for the response and appreciate your patience.

I stepped into different problem. I tried with simple c++ program to upload
files and it worked. This code I have integrated into a C++ windows service
(Managed code, .net Framework 2003 C++). File uploading code when pasted
into Windows Service project cpp file it compiles but when the Windows
service is run the service immediately stops. Before integrating the
FileUploading curl coed the windows service was perfectly working fine.

I started slowly line by line of curl code (FileUploading) compiling and
running service till the service runs fine. The service stops when the line

Curl * curl = curl_easy_init(); is included.

Will there be any issues if curl lib is used in Windows Service which is
Managed c++.

Regards,
Krishna

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Thursday, November 06, 2008 3:04 AM
To: the curl tool
Subject: Re: Login & FileUpload via HTTP POST faling - using curl_formadd

On Wed, 5 Nov 2008, Krishna Murthy Gudipati wrote:

> From the MSDOS command prompt using curl.exe the login and upload is
> perfectly working. But login and upload using libcurl from C++ application

> is failing.

First, you should consider comparing *full* protocol dumps that also include

all the data the two versions _send_ in their requests. Then, you only
showed
us data from one of the two requests both of your versions do.

Apart from that, it is quite easy to just view the two versions next to each

other and tell what the differences are. Just make sure that you fix the
differences. They include content-length size and cookies as far as I could
see.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-11-06

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET