aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-28 09:30:12 +0200
committerMax Kellermann <max@duempel.org>2009-04-28 09:30:12 +0200
commit0edfbc8a5f74256a4b9eded2d6006d5e504757d4 (patch)
treea48be78c76928b6234bea5a21c4c8fffdfd32553 /src
parentc434379d7977dfe4c10f964949beedc2d7ccce47 (diff)
downloadmpd-0edfbc8a5f74256a4b9eded2d6006d5e504757d4.tar.gz
mpd-0edfbc8a5f74256a4b9eded2d6006d5e504757d4.tar.xz
mpd-0edfbc8a5f74256a4b9eded2d6006d5e504757d4.zip
input_curl: use g_ascii_strcasecmp() instead of strcasecmp()
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
Diffstat (limited to 'src')
-rw-r--r--src/input/curl_input_plugin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index 4bdeda8dc..a140556c5 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -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;