cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: File Upload & Post problem - libcurl + PHP

From: lakshmipriya prabhu <prabhu_priya_at_yahoo.com>
Date: Tue, 2 May 2006 15:24:08 -0700 (PDT)

Hi ,
   
  I am not using the command line client (--trace-ascii option cannot be used) because i need to capture the dynamic "_VIEWSTATE" variable which needs to be posted to the site which is not possible with the cURL.
   
  Even if i disable the CURLOPT_VERBOSE i get the same problem (File not getting uploaded and the parameters not getting posted.)
   
  I am using HTTP analyser to track the request/response, cookie etc and emulating it in my code.
   
  Could you suggest what is getting missed from my part for the upload and post not happening.
   
  Thanks,
  Lakshmi
   
  

Daniel Stenberg <daniel_at_haxx.se> wrote:
  On Tue, 2 May 2006, lakshmipriya prabhu wrote:

> The output should show a trace of the file uploaded and the parameters
> posted.

Eh, no. If you use the simple CURLOPT_VERBOSE approach it won't.

Which is why I advice you should debug these things using the command line
client and use the --trace-ascii option.

> But i dont get a trace as mentioned above for multipart/form-data upload
> ,instead i get a HTTP/1.1 100 and then HTTP/1.1 200 and get redirected to
> error page.

The 200 is not a redirect. I take it you meant a HTML redirect...

> Coul you let me know why this happens?

Yes, the server responds with this when you send the post to it.

And to figure out why the server responds this way, you need to understand
what it requires and why you don't fulfill that requirement.

LiveHTTPHeaders and --trace-ascii is a super combination to sort that out.

-- 
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
		
---------------------------------
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! Messenger with Voice.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-05-03