Commit e4e097ee authored by tufengqi's avatar tufengqi

cookie版本修复

parent 2f848f83
...@@ -205,7 +205,7 @@ class TCurlClient extends \Thrift\Transport\TTransport ...@@ -205,7 +205,7 @@ class TCurlClient extends \Thrift\Transport\TTransport
curl_setopt(self::$curlHandle, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt(self::$curlHandle, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt(self::$curlHandle, CURLOPT_FOLLOWLOCATION, true); curl_setopt(self::$curlHandle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt(self::$curlHandle, CURLOPT_MAXREDIRS, 1); curl_setopt(self::$curlHandle, CURLOPT_MAXREDIRS, 1);
$cookie = VERSION_KEY . ':' . VERSION_VALUE; $cookie = VERSION_KEY . '=' . VERSION_VALUE_NO_PTEFIX;
curl_setopt(self::$curlHandle, CURLOPT_COOKIE, $cookie); curl_setopt(self::$curlHandle, CURLOPT_COOKIE, $cookie);
} }
// God, PHP really has some esoteric ways of doing simple things. // God, PHP really has some esoteric ways of doing simple things.
......
...@@ -206,7 +206,7 @@ class TGuzzleClient extends \Thrift\Transport\TTransport ...@@ -206,7 +206,7 @@ class TGuzzleClient extends \Thrift\Transport\TTransport
$host = $this->host_ . ($this->port_ != 80 ? ':' . $this->port_ : ''); $host = $this->host_ . ($this->port_ != 80 ? ':' . $this->port_ : '');
$fullUrl = $this->scheme_ . "://" . $host . $this->uri_; $fullUrl = $this->scheme_ . "://" . $host . $this->uri_;
$headers = [ $headers = [
'cookies' => [VERSION_KEY => VERSION_VALUE] 'cookies' => [VERSION_KEY => VERSION_VALUE_NO_PTEFIX]
]; ];
$defaultHeaders = [ $defaultHeaders = [
'Host' => $host, 'Host' => $host,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment