Check for application/pdf as a substring and not as a full string for Content-Type and metadata in order to determine downloaded file type
This commit is contained in:
parent
89a5408c2d
commit
1f6e0ecdc8
|
@ -599,9 +599,13 @@ namespace gourou
|
|||
|
||||
std::string rightsStr = item->getRights();
|
||||
|
||||
if (headers.count("Content-Type") && headers["Content-Type"] == "application/pdf")
|
||||
if (item->getMetadata("format").find("application/pdf") != std::string::npos)
|
||||
res = PDF;
|
||||
|
||||
if (headers.count("Content-Type") &&
|
||||
headers["Content-Type"].find("application/pdf") != std::string::npos)
|
||||
res = PDF;
|
||||
|
||||
if (res == EPUB)
|
||||
{
|
||||
void* handler = client->zipOpen(path);
|
||||
|
|
Loading…
Reference in New Issue
Block a user