Commit 312da40d authored by tufengqi's avatar tufengqi

force service version

parent fe20eca2
...@@ -210,8 +210,8 @@ class TCurlClient extends \Thrift\Transport\TTransport ...@@ -210,8 +210,8 @@ 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);
if (defined('VERSION_KEY') && !empty($GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'])) { if (defined('SERVICE_FORCE_VERSION_KEY') && !empty($GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'])) {
$cookie = VERSION_KEY . '=' . $GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX']; $cookie = SERVICE_FORCE_VERSION_KEY . '=' . $GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'];
curl_setopt(self::$curlHandle, CURLOPT_COOKIE, $cookie); curl_setopt(self::$curlHandle, CURLOPT_COOKIE, $cookie);
} }
} }
......
...@@ -215,9 +215,9 @@ class TGuzzleClient extends \Thrift\Transport\TTransport ...@@ -215,9 +215,9 @@ class TGuzzleClient extends \Thrift\Transport\TTransport
'Content-Length' => TStringFuncFactory::create()->strlen($this->request_) 'Content-Length' => TStringFuncFactory::create()->strlen($this->request_)
]; ];
$headers = array_merge($defaultHeaders, $this->headers_); $headers = array_merge($defaultHeaders, $this->headers_);
if (defined('VERSION_KEY') && !empty($GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'])) { if (defined('SERVICE_FORCE_VERSION_KEY') && !empty($GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'])) {
$headers = array_merge($headers, [ $headers = array_merge($headers, [
'cookies' => [VERSION_KEY => $GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX']] 'cookies' => [SERVICE_FORCE_VERSION_KEY => $GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX']]
]); ]);
} }
// Send an asynchronous request. // Send an asynchronous request.
......
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