curl-and-php
RE: HTTP post with PHP & CURL using basic authentication and followingredirect
From: Edin Kadribasic <edink_at_proventum.net>
Date: Thu, 22 Mar 2001 19:41:45 +0100
Date: Thu, 22 Mar 2001 19:41:45 +0100
I should have been more careful with the arguments ;)
Yes, I can reproduce the problem on the command line. Curl just gets
stuck. If I add -i I get a neverending display like:
HTTP/1.1 302 Found
Server: Lotus-Domino/5.0.5
Date: Thu, 22 Mar 2001 18:40:47 GMT
Location:
http://194.68.213.78/se/info.nsf/BySelectedMf?OpenForm&mf=3Com&category=
-+Välj+kategori+-+
Connection: close
Content-Type: text/html
HTTP/1.1 302 Found
Server: Lotus-Domino/5.0.5
Date: Thu, 22 Mar 2001 18:40:47 GMT
Location:
http://194.68.213.78/se/info.nsf/BySelectedMf?OpenForm&mf=3Com&category=
-+Välj+kategori+-+
Connection: close
Content-Type: text/html
...
...
-- Edin Kadribasic UNIX Developer Proventum.NET -----Original Message----- From: Daniel Stenberg [mailto:daniel_at_haxx.se] Sent: Thursday, March 22, 2001 7:38 PM To: curl-and-php_at_lists.sourceforge.net Subject: Re: HTTP post with PHP & CURL using basic authentication and followingredirect 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 _______________________________________________ Curl-and-php mailing list Curl-and-php_at_lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-and-phpReceived on 2001-03-22