HTTP重定向过多 [英] Too many HTTP redirects

查看:218
本文介绍了HTTP重定向过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题不会一直发生.我收到的错误如下,

The problem doesn't happen all the time. The error i'm getting is the following,

Error Domain=NSURLErrorDomain Code=-1007 "too many HTTP redirects"
UserInfo=0x14d18d40{NSErrorFailingURLStringKey=URLHERE,
NSErrorFailingURLKey=URLHERE,NSLocalizedDescription=too many HTTP redirects,  
NSUnderlyingError=0x14d18a10 "too many HTTP redirects"}

有人可以给我一个思路,向我指出正确的方向吗?

Could someone possibly give me an idea on what do here and point me in the right direction?

好的,基本上我想做的是在调用doPortal时,它使用URL加载Portal页面.但是,当我这样做时,它会显示有关太多HTTP重定向的错误.

Okay basically what i'm trying to do is when the doPortal is called, it loads up the Portal page with the URL. However when i do this, it shows the error about too many HTTP redirects.

代码:

 -(void)doPortal
{
    [ViewController SetRioSubjectName:[[ViewController getDictionaryOfKeys] objectForKey:[ViewController GetKeyName:k_SubjectName]] role:[ViewController getRoleID] ticket:[SpineMgr getTicket] TestURL:@"TestURL/login/testloginverifydetails.asp?database=LIVE&username=$spineuuid$&smartcardToken=$token$&role=$role$"];
    NSURL *url = [NSURL URLWithString:PortalURL];
    [self.webView loadRequest:request];
}

谢谢.

推荐答案

NSString *html = [NSString stringWithFormat:@"<html><body><a href=\"%@\">Link</body></html>", @"https://appian.com"];

[self.webView loadHTMLString:html baseURL:nil];

这篇关于HTTP重定向过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆