Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reversing polarity - ApiKey should only be sent if it is valid

  • Loading branch information...
commit 3ca31f8001b7f355c422f94a5734d0901162d3f0 1 parent 6a8760c
@ayende ayende authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Raven.Client.Lightweight/Document/DocumentStore.cs
View
2  Raven.Client.Lightweight/Document/DocumentStore.cs
@@ -553,7 +553,7 @@ private HttpWebRequest PrepareOAuthRequest(string oauthSource)
authRequest.Headers["grant_type"] = "client_credentials";
authRequest.Accept = "application/json;charset=UTF-8";
- if (string.IsNullOrEmpty(ApiKey))
+ if (string.IsNullOrEmpty(ApiKey) == false)
authRequest.Headers["Api-Key"] = ApiKey;
if (oauthSource.StartsWith("https", StringComparison.InvariantCultureIgnoreCase) == false &&
Please sign in to comment.
Something went wrong with that request. Please try again.