aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-07 15:15:56 +0200
committerMax Kellermann <max@duempel.org>2014-08-07 16:08:02 +0200
commit59d38f876a22ef520c6b897a356e8fb8677481aa (patch)
treeac97bf3dfa23a4ae30a1d76375493f8815c649ff /src/input/plugins
parent5c5c6a965cc3af4c8e725c7c9cc377e80f728279 (diff)
downloadmpd-59d38f876a22ef520c6b897a356e8fb8677481aa.tar.gz
mpd-59d38f876a22ef520c6b897a356e8fb8677481aa.tar.xz
mpd-59d38f876a22ef520c6b897a356e8fb8677481aa.zip
util/StringUtil: add StripRight() overload with "end" argument
Diffstat (limited to '')
-rw-r--r--src/input/plugins/CurlInputPlugin.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx
index 4d7671cc2..a174fcca6 100644
--- a/src/input/plugins/CurlInputPlugin.cxx
+++ b/src/input/plugins/CurlInputPlugin.cxx
@@ -31,7 +31,7 @@
#include "event/Call.hxx"
#include "IOThread.hxx"
#include "util/ASCII.hxx"
-#include "util/CharUtil.hxx"
+#include "util/StringUtil.hxx"
#include "util/NumberParser.hxx"
#include "util/CircularBuffer.hxx"
#include "util/HugeAllocator.hxx"
@@ -661,11 +661,8 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
/* strip the value */
- while (value < end && IsWhitespaceOrNull(*value))
- ++value;
-
- while (end > value && IsWhitespaceOrNull(end[-1]))
- --end;
+ value = StripLeft(value, end);
+ end = StripRight(value, end);
c.HeaderReceived(name, std::string(value, end));
return size;