Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds additional error checking.

  • Loading branch information...
commit afcdf6efb389389031e0a9286c57ae3e2f8e9809 1 parent 257e43b
@AArnott AArnott authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/DotNetOpenAuth.OpenId/OpenId/XriDiscoveryProxyService.cs
View
2  src/DotNetOpenAuth.OpenId/OpenId/XriDiscoveryProxyService.cs
@@ -92,7 +92,9 @@ public class XriDiscoveryProxyService : IIdentifierDiscoveryService, IRequireHos
XrdsDocument doc;
using (var xrdsResponse = await Yadis.RequestAsync(GetXrdsUrl(identifier), identifier.IsDiscoverySecureEndToEnd, hostFactories, cancellationToken)) {
+ xrdsResponse.EnsureSuccessStatusCode();
var readerSettings = MessagingUtilities.CreateUntrustedXmlReaderSettings();
+ ErrorUtilities.VerifyProtocol(xrdsResponse.Content != null, "XRDS request \"{0}\" returned no response.", GetXrdsUrl(identifier));
await xrdsResponse.Content.LoadIntoBufferAsync();
using (var xrdsStream = await xrdsResponse.Content.ReadAsStreamAsync()) {
doc = new XrdsDocument(XmlReader.Create(xrdsStream, readerSettings));
Please sign in to comment.
Something went wrong with that request. Please try again.