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
38990026
Commit
38990026
authored
Dec 20, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: use token helpers
parent
b32d5548
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
modules/access/http/file.c
modules/access/http/file.c
+2
-6
modules/access/http/h1conn.c
modules/access/http/h1conn.c
+8
-6
No files found.
modules/access/http/file.c
View file @
38990026
...
...
@@ -206,12 +206,8 @@ bool vlc_http_file_can_seek(struct vlc_http_file *file)
if
(
status
==
206
||
status
==
416
)
return
true
;
/* Partial Content */
const
char
*
str
=
vlc_http_msg_get_header
(
file
->
resp
,
"Accept-Ranges"
);
/* FIXME: tokenize */
if
(
str
!=
NULL
&&
!
vlc_ascii_strcasecmp
(
str
,
"bytes"
))
return
true
;
return
false
;
return
vlc_http_msg_get_token
(
file
->
resp
,
"Accept-Ranges"
,
"bytes"
)
!=
NULL
;
}
char
*
vlc_http_file_get_type
(
struct
vlc_http_file
*
file
)
...
...
modules/access/http/h1conn.c
View file @
38990026
...
...
@@ -169,6 +169,7 @@ static struct vlc_http_msg *vlc_h1_stream_wait(struct vlc_http_stream *stream)
{
struct
vlc_h1_conn
*
conn
=
vlc_h1_stream_conn
(
stream
);
struct
vlc_http_msg
*
resp
;
const
char
*
str
;
size_t
len
;
int
minor
;
...
...
@@ -197,18 +198,19 @@ static struct vlc_http_msg *vlc_h1_stream_wait(struct vlc_http_stream *stream)
if
(
minor
>=
1
)
{
const
char
*
str
=
vlc_http_msg_get_header
(
resp
,
"Connection"
);
if
(
str
!=
NULL
&&
strcasestr
(
str
,
"close"
))
/* FIXME: tokenize */
if
(
vlc_http_msg_get_token
(
resp
,
"Connection"
,
"close"
)
!=
NULL
)
conn
->
connection_close
=
true
;
/* FIXME: tokenize, check if chunked is _last_ */
str
=
vlc_http_msg_get_header
(
resp
,
"Transfer-Encoding"
);
if
(
str
!=
NULL
&&
strcasestr
(
str
,
"chunked"
))
str
=
vlc_http_msg_get_token
(
resp
,
"Transfer-Encoding"
,
"chunked"
);
if
(
str
!=
NULL
)
{
if
(
vlc_http_next_token
(
str
)
!=
NULL
)
return
vlc_h1_stream_fatal
(
conn
);
/* unsupported TE */
assert
(
conn
->
content_length
==
UINTMAX_MAX
);
stream
=
vlc_chunked_open
(
stream
,
conn
->
conn
.
tls
);
if
(
unlikely
(
stream
==
NULL
))
return
NULL
;
return
vlc_h1_stream_fatal
(
conn
)
;
}
}
else
...
...
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