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
e72b0828
Commit
e72b0828
authored
Dec 20, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding headers to statistics location with tag and last commit information
parent
a025280b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
ngx_http_push_stream_module.h
include/ngx_http_push_stream_module.h
+2
-0
ngx_http_push_stream_module_version.h
include/ngx_http_push_stream_module_version.h
+32
-0
ngx_http_push_stream_module_publisher.c
src/ngx_http_push_stream_module_publisher.c
+4
-0
No files found.
include/ngx_http_push_stream_module.h
View file @
e72b0828
...
...
@@ -241,6 +241,8 @@ static const ngx_str_t NGX_HTTP_PUSH_STREAM_HEADER_LAST_EVENT_ID = ngx_string("
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_ALLOW
=
ngx_string
(
"Allow"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_EXPLAIN
=
ngx_string
(
"X-Nginx-PushStream-Explain"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_MODE
=
ngx_string
(
"X-Nginx-PushStream-Mode"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_TAG
=
ngx_string
(
"X-Nginx-PushStream-Tag"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_COMMIT
=
ngx_string
(
"X-Nginx-PushStream-Commit"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_TRANSFER_ENCODING
=
ngx_string
(
"Transfer-Encoding"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_CHUNCKED
=
ngx_string
(
"chunked"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_HEADER_ETAG
=
ngx_string
(
"Etag"
);
...
...
include/ngx_http_push_stream_module_version.h
0 → 100644
View file @
e72b0828
/*
* Copyright (C) 2010-2011 Wandenberg Peixoto <wandenberg@gmail.com>, Rogério Carvalho Schneider <stockrt@gmail.com>
*
* This file is part of Nginx Push Stream Module.
*
* Nginx Push Stream Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Nginx Push Stream Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Nginx Push Stream Module. If not, see <http://www.gnu.org/licenses/>.
*
*
* ngx_http_push_stream_module.h
*
* Created: Oct 26, 2010
* Authors: Wandenberg Peixoto <wandenberg@gmail.com>, Rogério Carvalho Schneider <stockrt@gmail.com>
*/
#ifndef NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_
#define NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_TAG
=
ngx_string
(
"0.3.2"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_COMMIT
=
ngx_string
(
"a025280b90abdab219dd1718c61fcc6a0ad56c3d"
);
#endif
/* NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_ */
src/ngx_http_push_stream_module_publisher.c
View file @
e72b0828
...
...
@@ -24,6 +24,7 @@
*/
#include <ngx_http_push_stream_module_publisher.h>
#include <ngx_http_push_stream_module_version.h>
static
ngx_int_t
ngx_http_push_stream_publisher_handle_post
(
ngx_http_push_stream_loc_conf_t
*
cf
,
ngx_http_request_t
*
r
,
ngx_str_t
*
id
);
...
...
@@ -207,6 +208,9 @@ ngx_http_push_stream_channels_statistics_handler(ngx_http_request_t *r)
r
->
keepalive
=
cf
->
keepalive
;
ngx_http_push_stream_add_response_header
(
r
,
&
NGX_HTTP_PUSH_STREAM_HEADER_TAG
,
&
NGX_HTTP_PUSH_STREAM_TAG
);
ngx_http_push_stream_add_response_header
(
r
,
&
NGX_HTTP_PUSH_STREAM_HEADER_COMMIT
,
&
NGX_HTTP_PUSH_STREAM_COMMIT
);
// only accept GET method
if
(
!
(
r
->
method
&
NGX_HTTP_GET
))
{
ngx_http_push_stream_add_response_header
(
r
,
&
NGX_HTTP_PUSH_STREAM_HEADER_ALLOW
,
&
NGX_HTTP_PUSH_STREAM_ALLOW_GET
);
...
...
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