diff --git a/NEWS b/NEWS
index d80864739..5976541d8 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ ver 0.21 (not yet released)
* output
- alsa: non-blocking mode
+ver 0.20.11 (not yet released)
+* storage
+ - curl: support Content-Type application/xml
+
ver 0.20.10 (2017/08/24)
* decoder
- ffmpeg: support MusicBrainz ID3v2 tags
diff --git a/doc/protocol.xml b/doc/protocol.xml
index 608a196a8..1f0ab7eb9 100644
--- a/doc/protocol.xml
+++ b/doc/protocol.xml
@@ -444,7 +444,9 @@
volume:
- 0-100
+ 0-100 or
+ -1 if the volume cannot
+ be determined
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
index ff660514a..082c62342 100644
--- a/src/storage/plugins/CurlStorage.cxx
+++ b/src/storage/plugins/CurlStorage.cxx
@@ -210,6 +210,22 @@ ParseU64(const char *s, size_t length)
return ParseU64(std::string(s, length).c_str());
}
+gcc_pure
+static bool
+IsXmlContentType(const char *content_type) noexcept
+{
+ return StringStartsWith(content_type, "text/xml") ||
+ StringStartsWith(content_type, "application/xml");
+}
+
+gcc_pure
+static bool
+IsXmlContentType(const std::multimap &headers) noexcept
+{
+ auto i = headers.find("content-type");
+ return i != headers.end() && IsXmlContentType(i->second.c_str());
+}
+
/**
* A WebDAV PROPFIND request. Each "response" element will be passed
* to OnDavResponse() (to be implemented by a derived class).
@@ -271,9 +287,7 @@ private:
throw FormatRuntimeError("Status %d from WebDAV server; expected \"207 Multi-Status\"",
status);
- auto i = headers.find("content-type");
- if (i == headers.end() ||
- strncmp(i->second.c_str(), "text/xml", 8) != 0)
+ if (!IsXmlContentType(headers))
throw std::runtime_error("Unexpected Content-Type from WebDAV server");
}
diff --git a/win32/build.py b/win32/build.py
index c6dd7005e..d2b1aef1a 100755
--- a/win32/build.py
+++ b/win32/build.py
@@ -51,6 +51,11 @@ class CrossGccToolchain:
self.strip = os.path.join(toolchain_bin, arch + '-strip')
common_flags = ''
+
+ if not x64:
+ # enable SSE support which is required for LAME
+ common_flags += ' -march=pentium3'
+
self.cflags = '-O2 -g ' + common_flags
self.cxxflags = '-O2 -g ' + common_flags
self.cppflags = '-isystem ' + os.path.join(install_prefix, 'include')