Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Java-于龙
origin-web-common
Commits
51c089e8
Commit
51c089e8
authored
Apr 05, 2017
by
Jeffrey Phillips
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use web socket protocol for ws requests when server block specifies protocol
parent
62b15616
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
origin-web-common-services.js
dist/origin-web-common-services.js
+4
-3
origin-web-common.js
dist/origin-web-common.js
+4
-3
origin-web-common.min.js
dist/origin-web-common.min.js
+0
-0
dataService.js
src/services/dataService.js
+4
-3
No files found.
dist/origin-web-common-services.js
View file @
51c089e8
...
...
@@ -2206,13 +2206,14 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
null
;
}
var
serviceProtocol
=
apiInfo
.
protocol
||
window
.
location
.
protocol
;
var
protocol
;
params
=
params
||
{};
if
(
isWebsocket
)
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"ws"
:
"wss"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"ws"
:
"wss"
;
}
else
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"http"
:
"https"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"http"
:
"https"
;
}
if
(
context
&&
context
.
namespace
&&
!
params
.
namespace
)
{
...
...
@@ -2233,7 +2234,7 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
}
var
template
;
var
templateOptions
=
{
protocol
:
apiInfo
.
protocol
||
protocol
,
protocol
:
protocol
,
hostPort
:
apiInfo
.
hostPort
,
prefix
:
apiInfo
.
prefix
,
group
:
apiInfo
.
group
,
...
...
dist/origin-web-common.js
View file @
51c089e8
...
...
@@ -3415,13 +3415,14 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
null
;
}
var
serviceProtocol
=
apiInfo
.
protocol
||
window
.
location
.
protocol
;
var
protocol
;
params
=
params
||
{};
if
(
isWebsocket
)
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"ws"
:
"wss"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"ws"
:
"wss"
;
}
else
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"http"
:
"https"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"http"
:
"https"
;
}
if
(
context
&&
context
.
namespace
&&
!
params
.
namespace
)
{
...
...
@@ -3442,7 +3443,7 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
}
var
template
;
var
templateOptions
=
{
protocol
:
apiInfo
.
protocol
||
protocol
,
protocol
:
protocol
,
hostPort
:
apiInfo
.
hostPort
,
prefix
:
apiInfo
.
prefix
,
group
:
apiInfo
.
group
,
...
...
dist/origin-web-common.min.js
View file @
51c089e8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/services/dataService.js
View file @
51c089e8
...
...
@@ -1210,13 +1210,14 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
null
;
}
var
serviceProtocol
=
apiInfo
.
protocol
||
window
.
location
.
protocol
;
var
protocol
;
params
=
params
||
{};
if
(
isWebsocket
)
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"ws"
:
"wss"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"ws"
:
"wss"
;
}
else
{
protocol
=
window
.
location
.
p
rotocol
===
"http:"
?
"http"
:
"https"
;
protocol
=
serviceP
rotocol
===
"http:"
?
"http"
:
"https"
;
}
if
(
context
&&
context
.
namespace
&&
!
params
.
namespace
)
{
...
...
@@ -1237,7 +1238,7 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
}
var
template
;
var
templateOptions
=
{
protocol
:
apiInfo
.
protocol
||
protocol
,
protocol
:
protocol
,
hostPort
:
apiInfo
.
hostPort
,
prefix
:
apiInfo
.
prefix
,
group
:
apiInfo
.
group
,
...
...
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