I have an iPad app which loads a plist from a server fine on a UIWebView but when I try to get it as response string from the server, it returns a http status code 400 with response string as Request Error (invalid_request).
It happens only in middle east countries. One user from United Arab Emirates confirmed about the issue to whom I sent an adhoc build for testing. App returns a status code of 400 but the plist loads fine on UIWebView.
I had been trying for 2 different servers - AWS server and another hosted in USA. For both the servers, it gives the same status code.
Can anyone give suggestions as to why it should happen?
Here's a part of the code:
.....
ASIHTTPRequest *request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease];
[request addRequestHeader:@"Content-Type" value:@"text/xml; charset=utf-8"];
[request addRequestHeader:@"Accept-Encoding" value:@"text/xml;charset=utf-8"];
[request setRequestMethod:@"GET"];
[request setDelegate:self];
[request setDidFinishSelector: @selector(gotTheResponse:)];
[request setDidFailSelector: @selector(requestFailed:)];
[networkQueue addOperation: request];
[networkQueue go];
....