From f768fc0a4281cad0c268ef142911eea4cc3ead00 Mon Sep 17 00:00:00 2001 From: clanmills Date: Fri, 15 May 2020 11:05:03 +0100 Subject: [PATCH] RemoteIo/http object to throw kerFileOpenFailed and not kerTiffDirectoryTooLarge --- src/basicio.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/basicio.cpp b/src/basicio.cpp index bd6dba00..283246da 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -30,6 +30,7 @@ #include "error.hpp" #include "http.hpp" #include "properties.hpp" +#include "image_int.hpp" // + standard includes #include @@ -2099,7 +2100,7 @@ namespace Exiv2 { request["verb"] = "HEAD"; long serverCode = (long)http(request, response, errors); if (serverCode < 0 || serverCode >= 400 || errors.compare("") != 0) { - throw Error(kerTiffDirectoryTooLarge, "Server", serverCode); + throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%ld",serverCode), hostInfo_.Path); } Exiv2::Dictionary_i lengthIter = response.find("Content-Length"); @@ -2123,7 +2124,7 @@ namespace Exiv2 { long serverCode = (long)http(request, responseDic, errors); if (serverCode < 0 || serverCode >= 400 || errors.compare("") != 0) { - throw Error(kerTiffDirectoryTooLarge, "Server", serverCode); + throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%ld",serverCode), hostInfo_.Path); } response = responseDic["body"]; } @@ -2175,7 +2176,7 @@ namespace Exiv2 { int serverCode = http(request, response, errors); if (serverCode < 0 || serverCode >= 400 || errors.compare("") != 0) { - throw Error(kerTiffDirectoryTooLarge, "Server", serverCode); + throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%ld",serverCode), hostInfo_.Path); } } HttpIo::HttpIo(const std::string& url, size_t blockSize)