Skip to content

Commit

Permalink
Merge pull request #1693 from CastagnaIT/add_headers
Browse files Browse the repository at this point in the history
[DrmFactory] Always add missing license req headers
  • Loading branch information
CastagnaIT authored Oct 13, 2024
2 parents 933a28d + be8d2c3 commit 54a146b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/decrypters/DrmFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "Helpers.h"
#include "clearkey/ClearKeyDecrypter.h"
#include "utils/Base64Utils.h"
#include "utils/StringUtils.h"
#include "utils/log.h"

#if ANDROID
Expand All @@ -37,27 +38,26 @@ void FillDrmConfigDefaults(std::string_view keySystem, DRM::Config& cfg)
{
if (!licCfg.isHttpGetRequest)
{
if (licCfg.reqHeaders.empty())
if (!STRING::KeyExists(licCfg.reqHeaders, "Content-Type"))
licCfg.reqHeaders["Content-Type"] = "application/octet-stream";
}
}
else if (keySystem == DRM::KS_PLAYREADY)
{
if (!licCfg.isHttpGetRequest)
{
if (licCfg.reqHeaders.empty())
{
if (!STRING::KeyExists(licCfg.reqHeaders, "Content-Type"))
licCfg.reqHeaders["Content-Type"] = "text/xml";
if (!STRING::KeyExists(licCfg.reqHeaders, "SOAPAction"))
licCfg.reqHeaders["SOAPAction"] =
"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense";
}
}
}
else if (keySystem == DRM::KS_WISEPLAY)
{
if (!licCfg.isHttpGetRequest)
{
if (licCfg.reqHeaders.empty())
if (!STRING::KeyExists(licCfg.reqHeaders, "Content-Type"))
licCfg.reqHeaders["Content-Type"] = "application/json";
}
}
Expand Down

0 comments on commit 54a146b

Please sign in to comment.