当我将网站加载到可可应用程序的 Web 视图中时,就会出现此问题。
我的问题描述:
错误域=NSURLErrorDomain代码=-1007“HTTP重定向太多”
用户信息=0x18d17d56{NSErrorFailingURLStringKey=URLHERE,
NSErrorFailingURLKey=URLHERE,NSLocalizedDescription=HTTP 太多
重定向}
为什么会出现这个错误
如何处理
我虽然点击了链接,但对我没有帮助
HTTP 重定向过多 https://stackoverflow.com/questions/23221662/too-many-http-redirects
使用 Alamofire 上传多部分表单数据时出现“太多 HTTP 重定向” https://stackoverflow.com/questions/33727493/too-many-http-redirects-while-using-alamofire-upload-multipart-form-data
太多 HTTP 重定向、Google Drive、iOS SDK https://stackoverflow.com/questions/38082914/too-many-http-redirects-google-drive-ios-sdk还有很多..
UPDATE:
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource {
if(redirectResponse)
{
if([redirectResponse.URL.absoluteString isEqualToString:self.webviewLoadingURL.absoluteString])
{
NSLog(@"both redirect and load url is same");
}
}
return request;
}
我在 webview 中得到相同的重定向和加载 URL。
我在 iPhone XS 上就遇到过这种情况。无论我做了什么,它都仅针对特定网址报告“太多 HTTP 重定向”。即使没有互联网连接!删除该应用程序并重新安装即可解决该问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)