1
votes

I am using ASIHTTPRequest in my project and i have a problem with iPhone 3G. i send a request to :

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

and in other devices i get a responde to :

- (void)requestFinished:(ASIHTTPRequest *)request

and in iPhone 3G i get a lot of times :

- (void)requestFailed:(ASIHTTPRequest *)request

with error MSG : The request timed out

i set the the request timeout to 30 seconds.

any idea why it happen?

1
may be your ASIHTTPRequest in 3G require more time, so change 30 to 90 and try itiDhaval

1 Answers

1
votes

I also had this problem on iPhone 3G! I figured out it was a HTTP*S* (SSL) problem. My "valid" certificate was flagged as invalid.

You might add [request setValidatesSecureCertificate:NO]; to your request.

If you are lucky you have the same problem. :)