Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d8c68f7f
Commit
d8c68f7f
authored
May 07, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RTSP Date:
parent
fe182634
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
modules/stream_out/rtsp.c
modules/stream_out/rtsp.c
+19
-1
No files found.
modules/stream_out/rtsp.c
View file @
d8c68f7f
...
...
@@ -348,6 +348,9 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
const
char
*
psz_session
=
NULL
,
*
psz
;
char
control
[
sizeof
(
"rtsp://[]:12345"
)
+
NI_MAXNUMERICHOST
+
strlen
(
rtsp
->
psz_path
)];
time_t
now
;
time
(
&
now
);
if
(
answer
==
NULL
||
query
==
NULL
||
cl
==
NULL
)
return
VLC_SUCCESS
;
...
...
@@ -376,6 +379,22 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
answer
->
i_body
=
0
;
answer
->
p_body
=
NULL
;
httpd_MsgAdd
(
answer
,
"Server"
,
"%s"
,
PACKAGE_STRING
);
/* Date: is always allowed, and sometimes mandatory with RTSP/2.0. */
struct
tm
ut
;
if
(
gmtime_r
(
&
now
,
&
ut
)
!=
NULL
)
{
/* RFC1123 format, GMT is mandatory */
static
const
char
wdays
[
7
][
4
]
=
{
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
};
static
const
char
mons
[
12
][
4
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
httpd_MsgAdd
(
answer
,
"Date"
,
"%s, %02u %s %04u %02u:%02u:%02u GMT"
,
wdays
[
ut
.
tm_wday
],
ut
.
tm_mday
,
mons
[
ut
.
tm_mon
],
1900
+
ut
.
tm_year
,
ut
.
tm_hour
,
ut
.
tm_min
,
ut
.
tm_sec
);
}
if
(
query
->
i_proto
!=
HTTPD_PROTO_RTSP
)
{
answer
->
i_status
=
505
;
...
...
@@ -689,7 +708,6 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
return
VLC_EGENERIC
;
}
httpd_MsgAdd
(
answer
,
"Server"
,
"%s"
,
PACKAGE_STRING
);
if
(
psz_session
)
httpd_MsgAdd
(
answer
,
"Session"
,
"%s"
/*;timeout=5*/
,
psz_session
);
...
...
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