Skip to content

Commit 0161be2

Browse files
committed
Merge pull request anaisbetts#159 from Tableau-David-Potter/feature/hostname-not-absolutestring
Pass the hostname to the certificate validator, not the absolute URL …
2 parents 7f30f9d + 149ffad commit 0161be2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ModernHttpClient/iOS/NSUrlSessionHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public override void DidReceiveChallenge(NSUrlSession session, NSUrlSessionTask
302302
}
303303

304304
sslErrorVerify:
305-
var hostname = task.CurrentRequest.Url.AbsoluteString;
305+
var hostname = task.CurrentRequest.Url.Host;
306306
bool result = ServicePointManager.ServerCertificateValidationCallback(hostname, root, chain, errors);
307307
if (result) {
308308
completionHandler(

0 commit comments

Comments
 (0)