Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0edfbc8a
Commit
0edfbc8a
authored
Apr 28, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input_curl: use g_ascii_strcasecmp() instead of strcasecmp()
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
parent
c434379d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
curl_input_plugin.c
src/input/curl_input_plugin.c
+7
-7
No files found.
src/input/curl_input_plugin.c
View file @
0edfbc8a
...
...
@@ -572,11 +572,11 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
while
(
end
>
value
&&
g_ascii_isspace
(
end
[
-
1
]))
--
end
;
if
(
strcasecmp
(
name
,
"accept-ranges"
)
==
0
)
{
if
(
g_ascii_
strcasecmp
(
name
,
"accept-ranges"
)
==
0
)
{
/* a stream with icy-metadata is not seekable */
if
(
!
icy_defined
(
&
c
->
icy_metadata
))
is
->
seekable
=
true
;
}
else
if
(
strcasecmp
(
name
,
"content-length"
)
==
0
)
{
}
else
if
(
g_ascii_
strcasecmp
(
name
,
"content-length"
)
==
0
)
{
char
buffer
[
64
];
if
((
size_t
)(
end
-
header
)
>=
sizeof
(
buffer
))
...
...
@@ -586,12 +586,12 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
buffer
[
end
-
value
]
=
0
;
is
->
size
=
is
->
offset
+
g_ascii_strtoull
(
buffer
,
NULL
,
10
);
}
else
if
(
strcasecmp
(
name
,
"content-type"
)
==
0
)
{
}
else
if
(
g_ascii_
strcasecmp
(
name
,
"content-type"
)
==
0
)
{
g_free
(
is
->
mime
);
is
->
mime
=
g_strndup
(
value
,
end
-
value
);
}
else
if
(
strcasecmp
(
name
,
"icy-name"
)
==
0
||
strcasecmp
(
name
,
"ice-name"
)
==
0
||
strcasecmp
(
name
,
"x-audiocast-name"
)
==
0
)
{
}
else
if
(
g_ascii_
strcasecmp
(
name
,
"icy-name"
)
==
0
||
g_ascii_
strcasecmp
(
name
,
"ice-name"
)
==
0
||
g_ascii_
strcasecmp
(
name
,
"x-audiocast-name"
)
==
0
)
{
g_free
(
c
->
meta_name
);
c
->
meta_name
=
g_strndup
(
value
,
end
-
value
);
...
...
@@ -600,7 +600,7 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
c
->
tag
=
tag_new
();
tag_add_item
(
c
->
tag
,
TAG_ITEM_NAME
,
c
->
meta_name
);
}
else
if
(
strcasecmp
(
name
,
"icy-metaint"
)
==
0
)
{
}
else
if
(
g_ascii_
strcasecmp
(
name
,
"icy-metaint"
)
==
0
)
{
char
buffer
[
64
];
size_t
icy_metaint
;
...
...
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