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
ff405e3c
Commit
ff405e3c
authored
Aug 17, 2013
by
Wandenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed push_stream_store_messages directive to make possible set it inside an if block
parent
93fe74e2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletion
+48
-1
CHANGELOG.textile
CHANGELOG.textile
+1
-0
properties_spec.rb
misc/spec/publisher/properties_spec.rb
+46
-0
ngx_http_push_stream_module_setup.c
src/ngx_http_push_stream_module_setup.c
+1
-1
No files found.
CHANGELOG.textile
View file @
ff405e3c
h1(#changelog). Changelog
* Changed push_stream_store_messages directive to make possible set it inside an if block
* Renamed broadcast feature to wildcard, more adequate with the way it works
** push_stream_broadcast_channel_prefix -> push_stream_wildcard_channel_prefix
** push_stream_broadcast_channel_max_qtd -> push_stream_wildcard_channel_max_qtd
...
...
misc/spec/publisher/properties_spec.rb
View file @
ff405e3c
...
...
@@ -423,6 +423,52 @@ describe "Publisher Properties" do
end
end
it
"should accept store messages inside an if block"
do
merged_config
=
config
.
merge
({
:header_template
=>
nil
,
:footer_template
=>
nil
,
:subscriber_connection_ttl
=>
'1s'
,
:extra_location
=>
%{
location /pub2 {
push_stream_publisher #{config[:publisher_mode]};
push_stream_channel_id $arg_id;
push_stream_store_messages off;
if ($arg_test) {
push_stream_store_messages on;
}
}
}
})
channel
=
'store_messages_inside_if_block'
body
=
'published message'
resp_1
=
""
resp_2
=
""
nginx_run_server
(
merged_config
)
do
|
conf
|
EventMachine
.
run
do
pub_1
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub2?id='
+
channel
.
to_s
).
post
:head
=>
headers
,
:body
=>
body
pub_1
.
callback
do
pub_1
.
should
be_http_status
(
200
)
response
=
JSON
.
parse
(
pub_1
.
response
)
response
[
"published_messages"
].
to_i
.
should
eql
(
1
)
response
[
"stored_messages"
].
to_i
.
should
eql
(
0
)
pub_2
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub2?id='
+
channel
.
to_s
+
'&test=1'
).
post
:head
=>
headers
,
:body
=>
body
pub_2
.
callback
do
pub_2
.
should
be_http_status
(
200
)
response
=
JSON
.
parse
(
pub_2
.
response
)
response
[
"published_messages"
].
to_i
.
should
eql
(
2
)
response
[
"stored_messages"
].
to_i
.
should
eql
(
1
)
EventMachine
.
stop
end
end
end
end
end
context
"when allow origin directive is set"
do
it
"should receive acess control allow headers"
do
channel
=
'test_access_control_allow_headers'
...
...
src/ngx_http_push_stream_module_setup.c
View file @
ff405e3c
...
...
@@ -129,7 +129,7 @@ static ngx_command_t ngx_http_push_stream_commands[] = {
offsetof
(
ngx_http_push_stream_loc_conf_t
,
channels_path
),
NULL
},
{
ngx_string
(
"push_stream_store_messages"
),
NGX_HTTP_MAIN_CONF
|
NGX_HTTP_SRV_CONF
|
NGX_HTTP_LOC_CONF
|
NGX_CONF_TAKE1
,
NGX_HTTP_MAIN_CONF
|
NGX_HTTP_SRV_CONF
|
NGX_HTTP_LOC_CONF
|
NGX_
HTTP_LIF_CONF
|
NGX_
CONF_TAKE1
,
ngx_conf_set_flag_slot
,
NGX_HTTP_LOC_CONF_OFFSET
,
offsetof
(
ngx_http_push_stream_loc_conf_t
,
store_messages
),
...
...
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