求教: 我自定义了一个NSURLProtocol,在canInitWithRequest方法中会先判断这个request有没有设置property([NSURLProtocol setProperty:@YES forKey:URLProtocolHandledKey inRequest:newRequest];) ,当然设置property是在
startLoading中设置的,如果设置了canInitWithRequest就返回NO; 我遇到的问题是,当加载一个url A时,会重定向到B,在startLoading中给A的request设置了property,然后由于重定向在canInitWithRequest方法中又拦截到了B的request,但这时候判断有没有property时,为什么是显示有property呢([NSURLProtocol propertyForKey:URLProtocolHandledKey inRequest:request]),url B的request并没有设置property啊,help!!!
iOS重定向遇到的问题,求教.
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-