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

curl-and-php

Re: HTTP post with PHP & CURL using basic authentication and following redirect

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 Mar 2001 19:38:13 +0100 (MET)

On Thu, 22 Mar 2001, Edin Kadribasic wrote:

> I don't know if this is a bug in CURL or PHP, but I'm having problems
> whith a small proxy that is needed for the project I'm working on now.
> The problem only occurs if I try to use POST, basic auth and follow the
> redirect at the same time. This is PHP proxy code:

[large parts cut off]

> curl_setopt($ch,CURLOPT_POSTFIELDS,$post);

> If I disable the redirect it works fine. I was unable to reproduce the
> exact problem using command line curl because the post data does not seem
> to be submitted to the server and this the redirect respnse never gets
> sent back. Then again, I might be missing something. Here's the command
> line I tried:
>
> curl -L -u "user:pass" -F
> "__Click=0&%25%25ModDate=C125696F00328981&SelectManufacturer=3Com&Select
> Category=_15kg5d13cd8g6mobkcljmusj940mi0_"
> "http://194.68.213.78/se/info.nsf/frontpage/FrontManufacturers?EditDocum
> ent&Seq=1"

The equivallent of CURLOPT_POSTFIELDS is -d, not -F. Try the exact same
command line with that tiny change to see if your problem appears!

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-and-php mailing list
Curl-and-php_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-and-php
Received on 2001-03-22