Allow answer of archiving service to be an HTTP redirection.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tastytea 2020-02-07 11:56:05 +01:00
parent 7e147012fe
commit 4f78da24b5
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -1,5 +1,5 @@
/* This file is part of remwharead.
* Copyright © 2019 tastytea <tastytea@tastytea.de>
* Copyright © 2019, 2020 tastytea <tastytea@tastytea.de>
*
* 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
{