-safariViewController:didCompleteInitialLoad: returns YES on 404

Originator:futuretap
Number:rdar://33400536 Date Originated:19-Juli-2017 02:33 PM
Status:Closed/Behaves as intended Resolved:
Product:iOS + SDK Product Version:11.0 beta 3
Classification:Other Bug Reproducible:Always
 
Summary:
When SFSafariViewController is opened for a URL that returns a 404 page, the delegate callback indicates a successful load.

Steps to Reproduce:
Present a SFSafariViewController with a URL that returns a page with a 404 HTTP status code.

Expected Results:
The delegate -safariViewController:didCompleteInitialLoad: is called back with didLoadSuccessfully=NO.

Actual Results:
The delegate -safariViewController:didCompleteInitialLoad: is called back with didLoadSuccessfully=YES.

Version:
11.0 beta 3

Notes:
It's important to know if SafariViewController opens a 404 page (or any other 4xx or 5xx HTTP status code). The app might want to open a backup page instead or dismiss the view controller.

Comments

See also: rdar://33695641 (Add callback to SFSafariViewControllerDelegate for 4xx/5xx status codes)

By futuretap at Aug. 3, 2017, 8:43 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!