Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8058703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:26:29+00:00 2026-06-05T09:26:29+00:00

I am experiencing an issue on iOS 4.3+ with ASIHTTPRequest where a request is

  • 0

I am experiencing an issue on iOS 4.3+ with ASIHTTPRequest where a request is fired but no data (Request methed, url, headers, etc) reaches the server. The connection times out because it never hears back.

The server hears the empty request (after some delay), then hears a valid request which is of course never reported to higher level code because the connection has timed out. This is all kind of strange because the request was not configured to resend data.

Often this happens after the app has been pushed to the background for some time (15 min or more) and the phone has been allowed to sleep.

My configuration of the request is as follows:

NSMutableData *postData = nil;

NSString *urlString = [NSString stringWithFormat:@"%@%@",[self baseURL],requestPath];

OTSHTTPRequest *request = [OTSHTTPRequest requestWithURL:[NSURL URLWithString:urlString]];
[request setCachePolicy:ASIFallbackToCacheIfLoadFailsCachePolicy];
[request setTimeOutSeconds:45];
//Set up body
NSString *queryString = [self _RPcreateQueryString:query];
if ([queryString length]>0) {
    if(method == RPAsyncServerMethodPost || method == RPAsyncServerMethodPut){
        postData = [[[queryString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] mutableCopy] autorelease];
    }else{
        NSURL *url = [NSURL URLWithString:[urlString stringByAppendingFormat:@"?%@",queryString]];
        [request setURL:url];
        if (!url) return nil; //url String malformed.
    }
}

// ... ///
// method setting stripped for brevity

[request addRequestHeader:@"Content-Type" value:@"application/x-www-form-urlencoded"];

if(headers){
    for (NSString* head in headers) {
        if ([[headers valueForKey:head] isKindOfClass:[NSString class]]) 
            [request addRequestHeader:head value:[headers valueForKey:head]];
    }
}
[request addRequestHeader:@"Content-Length" value:postLength];
[request setPostBody:postData];

OTSHTTPRequest is simply a subclass of ASIHTTPRequest that contains properties for a string tag, a pretty description, and other bling for use by consuming objects and does not override any ASI stuff.

Can anyone shed a light on why/how ASI could open a connection and then send absolutely nothing for minutes at a time?

Edit: Just to clarify. The connections DO make contact with the server, it just never sends any data through the connection from what my server logs can tell. This seems to always happen on app wake and effects all connections including NSURLConnections spawned by MapKit. the whole app just seems to loose its marbles.
I also see a bunch of background tasks ending badly right before this, but i can never catch them while in the debugger.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:26:31+00:00Added an answer on June 5, 2026 at 9:26 am

    I didnt want to say anything till a few days passed with out the issue. The solution in this case was very obscure.

    It appears the version of TestFlight i was using has a bug in it that may have contributed to this issue. Since its removal i have not experienced the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm experiencing an issue with how iOS 4 manage Location Service. Previously, when the
Im experiencing an issue with a production server. I can connect to the server
I am experiencing an issue where, when a server error occurs in my web
Possible Duplicate: Core Data not saving NSString. Hey all! Currently experiencing a weird issue
I'm experiencing a strange CSS spacing issue in Chrome (but not in Firefox and/or
I am experiencing a strange issue with connecting to my web server from my
I am experiencing an issue with v1 of Ninject and resetting the StandardKernel. I
from today I've been experiencing an issue with Google Maps resulting into not centering
I am experiencing a weird issue with PUT and POST ajax CORS requests in
I am experiencing a very frustrating issue when trying to insert a new record

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.