title: Huge delay on DELETE requests with 204 response and no content in Objective-C
body: <p>I'm having problem with iOS app (I'm not iOS developer, I'm responsible for API that that app uses) and DELETE requests.</p>
  
  <p>Api is using 204 responses with no content for DELETE requests and that have worked fine for all the client applications so far, without any problems.</p>
  
  <p>The issue is that when using NSUrlConnection all those DELETE requests either are processed for more than 60 seconds or fail because of timeout.</p>
  
  <p>This behaviour is only visible in out iOS implementations, other clients are getting response for exactly same request in less than 100ms.</p>
  
  <p>Is this common behaviour? Do anyone know any fix for that that hopefully doesn't require API rebuild? </p>
  
  <p>Code below was created just to emulate this behaviour and replicate problem on API development team side, but problem is the same (Access token obscured of course, authentication works fine):</p>
  
  <pre><code>//
  //  ViewController.m
  //  NoteablesTest
  
  #import "ViewController.h"
  
  @interface ViewController ()
  @property (weak, nonatomic) IBOutlet UILabel *loadingLabel;
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
      [_loadingLabel setHidden:true];
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  - (IBAction)didButtonTouched:(id)sender {
      NSString *url = @"https://api.noteables.com/editing-session/c180af93-ad3a-4751-a96a-dc47ff7732d4";
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
  
      [request setHTTPMethod:@"DELETE"];
  
      [request setValue:@"Bearer XXXX" forHTTPHeaderField:@"Authorization"];
  
      [request setValue:@"Noteables/1.0 (iPhone; iOS 8.1.3; Scale/2.00)" forHTTPHeaderField:@"User-Agent"];
  
      [request setValue:@"application/vnd.api.v1+json" forHTTPHeaderField:@"Content-Type"];
  
      [request setValue:@"en;q=1" forHTTPHeaderField:@"Accept-Language"];
  
      NSDate *start = [NSDate date];
  
      [_loadingLabel setHidden:false];
  
      [NSURLConnection  sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
  
          double timePassed = [start timeIntervalSinceNow];
          NSString *message = [NSString stringWithFormat:@"Elapsed: %f seconds", timePassed];
          [_loadingLabel setHidden:true];
  
  
          UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Result!" message: message  delegate:self cancelButtonTitle:@"Am I satisfied with this?" otherButtonTitles:nil, nil];
  
          [alert show];
  
          NSLog(@"%@", response);
      }];
  
  
  }
  
  @end
  </code></pre>