summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-04-13 09:57:40 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2008-04-13 09:58:28 -0700
commitf7748bb7da2dcbe1d4db0834164f85fa7cc2db06 (patch)
tree67084a09b78c7063016b5283f1d9416640e18edd
parent0b88e5456f676abfc175422a3571c783cf2aa72e (diff)
downloadDotNetOpenAuth-f7748bb7da2dcbe1d4db0834164f85fa7cc2db06.zip
DotNetOpenAuth-f7748bb7da2dcbe1d4db0834164f85fa7cc2db06.tar.gz
DotNetOpenAuth-f7748bb7da2dcbe1d4db0834164f85fa7cc2db06.tar.bz2
Fixed unhandled exception when HTTP responses lack a Content-Type header.
-rw-r--r--src/DotNetOpenId/RelyingParty/FetchResponse.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DotNetOpenId/RelyingParty/FetchResponse.cs b/src/DotNetOpenId/RelyingParty/FetchResponse.cs
index 58a56f2..2b729f0 100644
--- a/src/DotNetOpenId/RelyingParty/FetchResponse.cs
+++ b/src/DotNetOpenId/RelyingParty/FetchResponse.cs
@@ -27,7 +27,8 @@ namespace DotNetOpenId.RelyingParty {
this.RequestUri = requestUri;
this.ResponseStream = responseStream;
StatusCode = response.StatusCode;
- ContentType = new ContentType(response.ContentType);
+ if (!string.IsNullOrEmpty(response.ContentType))
+ ContentType = new ContentType(response.ContentType);
ContentEncoding = string.IsNullOrEmpty(response.ContentEncoding) ? DefaultContentEncoding : response.ContentEncoding;
Headers = response.Headers;
FinalUri = response.ResponseUri;