From 4f78da24b53d30066e8b6119fbced39b5e404d91 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 7 Feb 2020 11:56:05 +0100 Subject: [PATCH] Allow answer of archiving service to be an HTTP redirection. --- src/lib/uri.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/uri.cpp b/src/lib/uri.cpp index 517a34d..ed9ad6d 100644 --- a/src/lib/uri.cpp +++ b/src/lib/uri.cpp @@ -1,5 +1,5 @@ /* This file is part of remwharead. - * Copyright © 2019 tastytea + * Copyright © 2019, 2020 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -216,7 +216,14 @@ string URI::make_request(const string &uri, bool archive) const string answer; if (archive) { - answer = response.get("Content-Location"); + if (response.has("Content-Location")) + { + answer = response.get("Content-Location"); + } + else + { + answer = uri; + } } else {