Permalink
Browse files

Check for 204 in -connection:didReceiveResponse: and cancel connectio…

…n if true, calling delegate's -noContentResponseReceivedForConnection: method without going through unnecessary parsing steps.

Not sure if this is where this code is going to stay. T for B Mr Melty-Brain.
  • Loading branch information...
1 parent 058dcf0 commit 11517cfc6355b94ba044828bf8abcadea03bbfd3 Owain R Hunt committed Oct 12, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 UAGithubEngine.m
View
@@ -369,6 +369,12 @@ - (void)connection:(UAGithubURLConnection *)connection didReceiveResponse:(NSURL
}
}
+
+ else if (statusCode == 204)
+ {
+ [connection cancel];
+ [delegate noContentResponseReceivedForConnection:connection];
+ }
}

0 comments on commit 11517cf

Please sign in to comment.