2012-04-10 64 views
1

我在我的项目中使用ASIHTTPRequest,我有一个iPhone 3G的问题。 我发送一个请求:ASIHTTPRequest与iPhone 3G

NSURL* pageURL = [NSURL URLWithString:@"https://accounts.google.com/ServiceLogin?service=sj"]; 
loginPageRequest = [[ASIHTTPRequest alloc] initWithURL:pageURL]; 
[loginPageRequest setTimeOutSeconds:30]; 
[loginPageRequest setDelegate:self]; 
[loginPageRequest startAsynchronous]; 

,并在其他设备中我得到一个responde到:

- (void)requestFinished:(ASIHTTPRequest *)request 

,并在iPhone 3G,我收到了很多次:

- (void)requestFailed:(ASIHTTPRequest *)request 

与错误MSG:The request timed out

我设置请求超时为30秒。

任何想法为什么会发生?

+0

可能是你的ASIHTTPRequest在3G需要更多的时间,所以改变30到90并尝试它 – iDhaval 2012-04-10 10:37:40

回答

0

我在iPhone 3G上也有这个问题!我发现这是一个HTTP * S *(SSL)问题。我的“有效”证书被标记为无效。

您可能会将[request setValidatesSecureCertificate:NO];添加到您的请求中。

如果你幸运的话,你有同样的问题。 :)