couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Getting_started_with_PHP" by JohannPhilippStrathausen
Date Fri, 19 Nov 2010 20:23:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Getting_started_with_PHP" page has been changed by JohannPhilippStrathausen.
The comment on this change is: authorisation.
http://wiki.apache.org/couchdb/Getting_started_with_PHP?action=diff&rev1=19&rev2=20

--------------------------------------------------

           return false;
        } 
  
-       $request = "$method $url HTTP/1.0\r\nHost: " . $this->host . "\r\n"; 
+       $request = "$method $url HTTP/1.0\r\nHost: $this->host\r\n"; 
+ 
+       if ($this->user) {
+          $request .= "Authorization: Basic ".base64_encode("$this->user:$this->pass")."\r\n";

+          $request .= "\r\n"; 
+       }
  
        if($post_data) {
           $request .= "Content-Length: ".strlen($post_data)."\r\n\r\n"; 

Mime
View raw message