Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Linshizhi
ffmpeg.wasm-core
Commits
7a2fddb4
Commit
7a2fddb4
authored
Mar 10, 2014
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: K&R formatting cosmetics
parent
78b21c1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
http.c
libavformat/http.c
+17
-15
No files found.
libavformat/http.c
View file @
7a2fddb4
...
...
@@ -327,12 +327,11 @@ static int process_line(URLContext *h, char *line, int line_count,
/* error codes are 4xx and 5xx, but regard 401 as a success, so we
* don't abort until all headers have been parsed. */
if
(
s
->
http_code
>=
400
&&
s
->
http_code
<
600
&&
(
s
->
http_code
!=
401
||
s
->
auth_state
.
auth_type
!=
HTTP_AUTH_NONE
)
&&
if
(
s
->
http_code
>=
400
&&
s
->
http_code
<
600
&&
(
s
->
http_code
!=
401
||
s
->
auth_state
.
auth_type
!=
HTTP_AUTH_NONE
)
&&
(
s
->
http_code
!=
407
||
s
->
proxy_auth_state
.
auth_type
!=
HTTP_AUTH_NONE
))
{
end
+=
strspn
(
end
,
SPACE_CHARS
);
av_log
(
h
,
AV_LOG_WARNING
,
"HTTP error %d %s
\n
"
,
s
->
http_code
,
end
);
av_log
(
h
,
AV_LOG_WARNING
,
"HTTP error %d %s
\n
"
,
s
->
http_code
,
end
);
return
AVERROR
(
EIO
);
}
}
else
{
...
...
@@ -356,34 +355,37 @@ static int process_line(URLContext *h, char *line, int line_count,
av_free
(
s
->
location
);
s
->
location
=
new_loc
;
*
new_location
=
1
;
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Length"
)
&&
s
->
filesize
==
-
1
)
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Length"
)
&&
s
->
filesize
==
-
1
)
{
s
->
filesize
=
strtoll
(
p
,
NULL
,
10
);
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Range"
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Range"
))
{
/* "bytes $from-$to/$document_size" */
const
char
*
slash
;
if
(
!
strncmp
(
p
,
"bytes "
,
6
))
{
if
(
!
strncmp
(
p
,
"bytes "
,
6
))
{
p
+=
6
;
s
->
off
=
strtoll
(
p
,
NULL
,
10
);
if
((
slash
=
strchr
(
p
,
'/'
))
&&
strlen
(
slash
)
>
0
)
s
->
filesize
=
strtoll
(
slash
+
1
,
NULL
,
10
);
}
h
->
is_streamed
=
0
;
/* we _can_ in fact seek */
}
else
if
(
!
av_strcasecmp
(
tag
,
"Accept-Ranges"
)
&&
!
strncmp
(
p
,
"bytes"
,
5
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Accept-Ranges"
)
&&
!
strncmp
(
p
,
"bytes"
,
5
))
{
h
->
is_streamed
=
0
;
}
else
if
(
!
av_strcasecmp
(
tag
,
"Transfer-Encoding"
)
&&
!
av_strncasecmp
(
p
,
"chunked"
,
7
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Transfer-Encoding"
)
&&
!
av_strncasecmp
(
p
,
"chunked"
,
7
))
{
s
->
filesize
=
-
1
;
s
->
chunksize
=
0
;
}
else
if
(
!
av_strcasecmp
(
tag
,
"WWW-Authenticate"
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"WWW-Authenticate"
))
{
ff_http_auth_handle_header
(
&
s
->
auth_state
,
tag
,
p
);
}
else
if
(
!
av_strcasecmp
(
tag
,
"Authentication-Info"
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Authentication-Info"
))
{
ff_http_auth_handle_header
(
&
s
->
auth_state
,
tag
,
p
);
}
else
if
(
!
av_strcasecmp
(
tag
,
"Proxy-Authenticate"
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Proxy-Authenticate"
))
{
ff_http_auth_handle_header
(
&
s
->
proxy_auth_state
,
tag
,
p
);
}
else
if
(
!
av_strcasecmp
(
tag
,
"Connection"
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Connection"
))
{
if
(
!
strcmp
(
p
,
"close"
))
s
->
willclose
=
1
;
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Encoding"
))
{
if
(
!
av_strncasecmp
(
p
,
"gzip"
,
4
)
||
!
av_strncasecmp
(
p
,
"deflate"
,
7
))
{
}
else
if
(
!
av_strcasecmp
(
tag
,
"Content-Encoding"
))
{
if
(
!
av_strncasecmp
(
p
,
"gzip"
,
4
)
||
!
av_strncasecmp
(
p
,
"deflate"
,
7
))
{
#if CONFIG_ZLIB
s
->
compressed
=
1
;
inflateEnd
(
&
s
->
inflate_stream
);
...
...
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