note 83152 added to function.curl-setopt

From: Date: Tue, 13 May 2008 07:17:19 +0000
Subject: note 83152 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-139325@lists.php.net to get a copy of this message
Please note that the below is not entirely correct. This format will work partially, but does not always produce correct headers. The correct form for the same code is: <?php $str = array( "Accept-Language: en-us,en;q=0.5", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Keep-Alive: 300", "Connection: keep-alive" ); curl_setopt($this->curl_handle, CURLOPT_HTTPHEADER, $str); ?> The appropriate newlines/cr's *should* be handled by curl. This realization has cost me many hours, because Host, User-Agent, Cache-Control, etc appear to be handled correctly with the string form, but Content-Length and Content-Type are duplicated and the second copy is not parsed correctly by the server! ---- Server IP: 208.69.120.35 Probable Submitter: 69.22.221.93 ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- https://master.php.net/note/edit/83152 Del: integrated -- https://master.php.net/note/delete/83152/integrated Del: useless -- https://master.php.net/note/delete/83152/useless Del: bad code -- https://master.php.net/note/delete/83152/bad+code Del: spam -- https://master.php.net/note/delete/83152/spam Del: non-english -- https://master.php.net/note/delete/83152/non-english Del: in docs -- https://master.php.net/note/delete/83152/in+docs Del: other reasons-- https://master.php.net/note/delete/83152 Reject -- https://master.php.net/note/reject/83152 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139325) next »