Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
c470296c
Commit
c470296c
authored
Sep 18, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增强制设置thrfit版本功能
parent
3ec6d275
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
TCurlClient.php
classes/fpf/thrift/TCurlClient.php
+3
-2
No files found.
classes/fpf/thrift/TCurlClient.php
View file @
c470296c
...
...
@@ -209,8 +209,9 @@ class TCurlClient extends \Thrift\Transport\TTransport
curl_setopt
(
$this
->
handle
,
CURLOPT_CUSTOMREQUEST
,
'POST'
);
curl_setopt
(
$this
->
handle
,
CURLOPT_FOLLOWLOCATION
,
true
);
curl_setopt
(
$this
->
handle
,
CURLOPT_MAXREDIRS
,
1
);
if
(
defined
(
'SERVICE_FORCE_VERSION_KEY'
)
&&
!
empty
(
$GLOBALS
[
'GLOBAL_VERSION_VALUE_NO_PTEFIX'
]))
{
$cookie
=
SERVICE_FORCE_VERSION_KEY
.
'='
.
$GLOBALS
[
'GLOBAL_VERSION_VALUE_NO_PTEFIX'
];
if
(
defined
(
'SERVICE_FORCE_VERSION_KEY'
)
&&
(
!
empty
(
$GLOBALS
[
'GLOBAL_VERSION_VALUE_NO_PTEFIX'
])
||
!
empty
(
$GLOBALS
[
'GLOBAL_FORCE_THRIFT_VERSION_VALUE_NO_PTEFIX'
])))
{
$version
=
$GLOBALS
[
'GLOBAL_VERSION_VALUE_NO_PTEFIX'
]
?:
(
$GLOBALS
[
'GLOBAL_FORCE_THRIFT_VERSION_VALUE_NO_PTEFIX'
]
?:
''
);
$cookie
=
SERVICE_FORCE_VERSION_KEY
.
'='
.
$version
;
curl_setopt
(
$this
->
handle
,
CURLOPT_COOKIE
,
$cookie
);
}
// God, PHP really has some esoteric ways of doing simple things.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment