Skip to content

Commit

Permalink
[DrmFactory] Always add missing license req headers
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Oct 13, 2024
1 parent 933a28d commit be8d2c3
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 be8d2c3

Please sign in to comment.