Permalink
Browse files

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

  • Loading branch information...
1 parent 6a8760c commit 3ca31f8001b7f355c422f94a5734d0901162d3f0 @ayende ayende committed Oct 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 &&

0 comments on commit 3ca31f8

Please sign in to comment.