Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
nginx-push-stream-module
Commits
a8d35084
Commit
a8d35084
authored
Apr 07, 2013
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove default header template for EventSource subscribers
parent
8bdfda09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
ngx_http_push_stream_module_utils.h
include/ngx_http_push_stream_module_utils.h
+1
-1
event_source_spec.rb
misc/spec/subscriber/event_source_spec.rb
+11
-11
No files found.
include/ngx_http_push_stream_module_utils.h
View file @
a8d35084
...
...
@@ -203,7 +203,7 @@ static const ngx_str_t NGX_HTTP_PUSH_STREAM_TOKEN_MESSAGE_TEXT = ngx_string("~t
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_TOKEN_MESSAGE_TAG
=
ngx_string
(
"~tag~"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_TOKEN_MESSAGE_TIME
=
ngx_string
(
"~time~"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_EVENTSOURCE_DEFAULT_HEADER_TEMPLATE
=
ngx_string
(
"
:
"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_EVENTSOURCE_DEFAULT_HEADER_TEMPLATE
=
ngx_string
(
""
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_EVENTSOURCE_COMMENT_TEMPLATE
=
ngx_string
(
": ~text~
\r\n
"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_EVENTSOURCE_MESSAGE_PREFIX
=
ngx_string
(
"data: "
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_EVENTSOURCE_ID_TEMPLATE
=
ngx_string
(
"id: ~event-id~"
);
...
...
misc/spec/subscriber/event_source_spec.rb
View file @
a8d35084
...
...
@@ -64,7 +64,7 @@ describe "Subscriber Event Source" do
response
+=
chunk
end
sub
.
callback
do
response
.
should
eql
(
":
\r\n
:
footer line 1
\r\n
: footer line 2
\r\n
: footer line 3
\r\n
: footer line 4
\r\n\r\n
"
)
response
.
should
eql
(
": footer line 1
\r\n
: footer line 2
\r\n
: footer line 3
\r\n
: footer line 4
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -82,7 +82,7 @@ describe "Subscriber Event Source" do
response
+=
chunk
end
sub
.
callback
do
response
.
should
eql
(
":
\r\n
:
footer line 1
\\
nfooter line 2
\r\n\r\n
"
)
response
.
should
eql
(
": footer line 1
\\
nfooter line 2
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -100,7 +100,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
"
:
\r\n
data:
#{
body
}
\r\n\r\n
"
)
response
.
should
eql
(
"data:
#{
body
}
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -121,7 +121,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
"
:
\r\n
data:
#{
body
}
\r\n\r\n
"
)
response
.
should
eql
(
"data:
#{
body
}
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -143,7 +143,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
"
:
\r\n
id:
#{
event_id
}
\r\n
data:
#{
body
}
\r\n\r\n
"
)
response
.
should
eql
(
"id:
#{
event_id
}
\r\n
data:
#{
body
}
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -165,7 +165,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
"
:
\r\n
event:
#{
event_type
}
\r\n
data:
#{
body
}
\r\n\r\n
"
)
response
.
should
eql
(
"event:
#{
event_type
}
\r\n
data:
#{
body
}
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
@@ -186,7 +186,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
%(
:\r\n
data: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
response
.
should
eql
(
%(data: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
EventMachine
.
stop
end
end
...
...
@@ -207,7 +207,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
%(
:\r\n
data: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
response
.
should
eql
(
%(data: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
EventMachine
.
stop
end
end
...
...
@@ -229,7 +229,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
%(
:\r\n
id: #{event_id}\r\ndata: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
response
.
should
eql
(
%(id: #{event_id}\r\ndata: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
EventMachine
.
stop
end
end
...
...
@@ -251,7 +251,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"
\r\n\r\n
"
)
response
.
should
eql
(
%(
:\r\n
event: #{event_type}\r\ndata: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
response
.
should
eql
(
%(event: #{event_type}\r\ndata: {"id":"1", "message":"#{body}"}\r\n\r\n)
)
EventMachine
.
stop
end
end
...
...
@@ -330,7 +330,7 @@ describe "Subscriber Event Source" do
sub
.
stream
do
|
chunk
|
response
+=
chunk
if
response
.
include?
(
"msg 4"
)
response
.
should
eql
(
"
:
\r\n
data: msg 3
\r\n\r\n
id: event 3
\r\n
data: msg 4
\r\n\r\n
"
)
response
.
should
eql
(
"data: msg 3
\r\n\r\n
id: event 3
\r\n
data: msg 4
\r\n\r\n
"
)
EventMachine
.
stop
end
end
...
...
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