summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-06-21 19:47:50 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-06-21 19:47:50 -0700
commitf6581ea68f421395bba0b3c2f7d72708cf72979c (patch)
tree01599b957e9fc0608d4b3b42eacb977d7d8bcfec
parent98216166e5a9cf40cc2f829dfb95e8536cd3152f (diff)
parent361368ff341975643586ae21527d5d484548cf8e (diff)
downloadDotNetOpenAuth-f6581ea68f421395bba0b3c2f7d72708cf72979c.zip
DotNetOpenAuth-f6581ea68f421395bba0b3c2f7d72708cf72979c.tar.gz
DotNetOpenAuth-f6581ea68f421395bba0b3c2f7d72708cf72979c.tar.bz2
Merge branch 'master' into ImplicitGrants
-rw-r--r--src/DotNetOpenAuth/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs b/src/DotNetOpenAuth/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs
index a292977..59f536e 100644
--- a/src/DotNetOpenAuth/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs
+++ b/src/DotNetOpenAuth/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs
@@ -128,7 +128,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
// First search the authorization header.
string authorizationHeader = request.Headers[HttpRequestHeader.Authorization];
- if (authorizationHeader.StartsWith(Protocol.BearerHttpAuthorizationSchemeWithTrailingSpace, StringComparison.OrdinalIgnoreCase)) {
+ if (!string.IsNullOrEmpty(authorizationHeader) && authorizationHeader.StartsWith(Protocol.BearerHttpAuthorizationSchemeWithTrailingSpace, StringComparison.OrdinalIgnoreCase)) {
return authorizationHeader.Substring(Protocol.BearerHttpAuthorizationSchemeWithTrailingSpace.Length);
}