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
468150a0
Commit
468150a0
authored
Aug 30, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f35ef203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
SwooleHttpClient.php
classes/fpf/thrift/SwooleHttpClient.php
+2
-7
No files found.
classes/fpf/thrift/SwooleHttpClient.php
View file @
468150a0
...
...
@@ -203,12 +203,7 @@ class SwooleHttpClient extends \Thrift\Transport\TTransport
register_shutdown_function
([
$this
,
'closeCurlHandle'
]);
$options
=
[];
$host
=
$this
->
host_
.
(
$this
->
port_
!=
80
?
':'
.
$this
->
port_
:
''
);
$defaultHeaders
=
array
(
'Accept'
=>
'application/x-thrift'
,
'Content-Type'
=>
'application/x-thrift'
,
'User-Agent'
=>
'PHP/TCurlClient'
,
'Content-Length'
=>
TStringFuncFactory
::
create
()
->
strlen
(
$this
->
request_
)
);
$defaultHeaders
=
[];
$options
[
'base_uri'
]
=
$this
->
scheme_
.
"://"
.
$host
;
$options
[
'headers'
]
=
array_merge
(
$defaultHeaders
,
$this
->
headers_
);
if
(
defined
(
'VERSION_KEY'
)
&&
defined
(
'VERSION_VALUE_NO_PTEFIX'
))
{
...
...
@@ -224,7 +219,7 @@ class SwooleHttpClient extends \Thrift\Transport\TTransport
if
(
true
===
$scheme
&&
!
$parts
[
'port'
])
{
$parts
[
'port'
]
=
443
;
}
$parts
[
'port'
]
=
intval
(
$parts
[
'port'
]
??
80
)
;
$parts
[
'port'
]
=
$parts
[
'port'
]
?
intval
(
$parts
[
'port'
])
:
80
;
$this
->
handle
=
new
Client
(
$parts
[
'host'
],
$parts
[
'port'
],
$scheme
);
$this
->
handle
->
setHeaders
(
$options
[
'headers'
]);
$this
->
handle
->
set
([
'timeout'
=>
$options
[
'timeout'
]]);
...
...
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