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
51bd1874
Commit
51bd1874
authored
Dec 16, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: use revectored time functions
parent
c6dac3c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
modules/access/http/file.c
modules/access/http/file.c
+14
-9
No files found.
modules/access/http/file.c
View file @
51bd1874
...
...
@@ -84,18 +84,23 @@ static struct vlc_http_msg *vlc_http_file_req(const struct vlc_http_file *file,
if
(
file
->
referrer
!=
NULL
)
/* TODO: validate URL */
vlc_http_msg_add_header
(
req
,
"Referer"
,
"%s"
,
file
->
referrer
);
if
(
file
->
resp
!=
NULL
&&
(
str
=
vlc_http_msg_get_header
(
file
->
resp
,
"ETag"
)))
if
(
file
->
resp
!=
NULL
)
{
if
(
!
memcmp
(
str
,
"W/"
,
2
))
str
+=
2
;
/* skip weak mark */
vlc_http_msg_add_header
(
req
,
"If-Match"
,
"%s"
,
str
);
str
=
vlc_http_msg_get_header
(
file
->
resp
,
"ETag"
);
if
(
str
!=
NULL
)
{
if
(
!
memcmp
(
str
,
"W/"
,
2
))
str
+=
2
;
/* skip weak mark */
vlc_http_msg_add_header
(
req
,
"If-Match"
,
"%s"
,
str
);
}
else
{
time_t
mtime
=
vlc_http_msg_get_mtime
(
file
->
resp
);
if
(
mtime
!=
-
1
)
vlc_http_msg_add_time
(
req
,
"If-Unmodified-Since"
,
&
mtime
);
}
}
if
(
file
->
resp
!=
NULL
&&
(
str
=
vlc_http_msg_get_header
(
file
->
resp
,
"Date"
)))
vlc_http_msg_add_header
(
req
,
"If-Unmodified-Since"
,
"%s"
,
str
);
if
(
vlc_http_msg_add_header
(
req
,
"Range"
,
"bytes=%ju-"
,
offset
)
&&
offset
!=
0
)
goto
error
;
...
...
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