aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Security
diff options
context:
space:
mode:
authorhatharry <hatharry@hotmail.com>2016-10-11 17:10:00 +1300
committerGitHub <noreply@github.com>2016-10-11 17:10:00 +1300
commit9b0ac4bde5beb74703a258d582f477c6411ec6ec (patch)
treea59864414d58bd01c86085a36355fc553dd43736 /MediaBrowser.Common.Implementations/Security
parent71386f0ceb15ce0bac2e588f90781a4bd274fe68 (diff)
parentcb26cb94579b772fa7825c6769dc7ace38217168 (diff)
Merge pull request #28 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security')
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index 4e01041bc..5d440609e 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -142,9 +142,15 @@ namespace MediaBrowser.Common.Implementations.Security
}
set
{
- if (value != LicenseFile.RegKey)
+ var newValue = value;
+ if (newValue != null)
{
- LicenseFile.RegKey = value;
+ newValue = newValue.Trim();
+ }
+
+ if (newValue != LicenseFile.RegKey)
+ {
+ LicenseFile.RegKey = newValue;
LicenseFile.Save();
// re-load registration info
@@ -163,7 +169,8 @@ namespace MediaBrowser.Common.Implementations.Security
var options = new HttpRequestOptions()
{
Url = AppstoreRegUrl,
- CancellationToken = CancellationToken.None
+ CancellationToken = CancellationToken.None,
+ BufferContent = false
};
options.RequestHeaders.Add("X-Emby-Token", _appHost.SystemId);
options.RequestContent = parameters;
@@ -263,7 +270,8 @@ namespace MediaBrowser.Common.Implementations.Security
Url = MBValidateUrl,
// Seeing block length errors
- EnableHttpCompression = false
+ EnableHttpCompression = false,
+ BufferContent = false
};
options.SetPostData(data);