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
2f848f83
Commit
2f848f83
authored
May 09, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http请求新增cookie传输版本
parent
201794d3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
TCurlClient.php
classes/fpf/thrift/TCurlClient.php
+2
-0
TGuzzleClient.php
classes/fpf/thrift/TGuzzleClient.php
+3
-1
No files found.
classes/fpf/thrift/TCurlClient.php
View file @
2f848f83
...
...
@@ -205,6 +205,8 @@ class TCurlClient extends \Thrift\Transport\TTransport
curl_setopt
(
self
::
$curlHandle
,
CURLOPT_CUSTOMREQUEST
,
'POST'
);
curl_setopt
(
self
::
$curlHandle
,
CURLOPT_FOLLOWLOCATION
,
true
);
curl_setopt
(
self
::
$curlHandle
,
CURLOPT_MAXREDIRS
,
1
);
$cookie
=
VERSION_KEY
.
':'
.
VERSION_VALUE
;
curl_setopt
(
self
::
$curlHandle
,
CURLOPT_COOKIE
,
$cookie
);
}
// God, PHP really has some esoteric ways of doing simple things.
$host
=
$this
->
host_
.
(
$this
->
port_
!=
80
?
':'
.
$this
->
port_
:
''
);
...
...
classes/fpf/thrift/TGuzzleClient.php
View file @
2f848f83
...
...
@@ -205,7 +205,9 @@ class TGuzzleClient extends \Thrift\Transport\TTransport
// God, PHP really has some esoteric ways of doing simple things.
$host
=
$this
->
host_
.
(
$this
->
port_
!=
80
?
':'
.
$this
->
port_
:
''
);
$fullUrl
=
$this
->
scheme_
.
"://"
.
$host
.
$this
->
uri_
;
$headers
=
[];
$headers
=
[
'cookies'
=>
[
VERSION_KEY
=>
VERSION_VALUE
]
];
$defaultHeaders
=
[
'Host'
=>
$host
,
'User-Agent'
=>
'PHP/THttpClient'
,
...
...
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