Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2018-07-06 19:41:53 +02:00
19 changed files with 316 additions and 62 deletions

View File

@@ -19,6 +19,7 @@
#include "config.h"
#include "CurlInputPlugin.hxx"
#include "lib/curl/Error.hxx"
#include "lib/curl/Easy.hxx"
#include "lib/curl/Global.hxx"
#include "lib/curl/Init.hxx"
@@ -194,7 +195,9 @@ CurlInputStream::OnHeaders(unsigned status,
assert(!icy || !icy->IsDefined());
if (status < 200 || status >= 300)
throw FormatRuntimeError("got HTTP status %ld", status);
throw HttpStatusError(status,
StringFormat<40>("got HTTP status %u",
status).c_str());
const std::lock_guard<Mutex> protect(mutex);