Skip to content

Commit

Permalink
This was crashing with iOS4, it seems sensible to check for nil heade…
Browse files Browse the repository at this point in the history
…rs before calling

an API that is expecting an NSDictionary.
  • Loading branch information
lukeredpath committed Jun 30, 2011
1 parent 76589a1 commit 143845b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/LRRestyResponse.m
Expand Up @@ -13,6 +13,8 @@

NSDictionary *extractCookiesFromHeaders(NSDictionary *headers, NSURL *url)
{
if (headers == nil) return [NSDictionary dictionary];

NSMutableDictionary *cookies = [NSMutableDictionary dictionary];
for (NSHTTPCookie *cookie in [NSHTTPCookie cookiesWithResponseHeaderFields:headers forURL:url]) {
[cookies setObject:cookie forKey:cookie.name];
Expand Down

0 comments on commit 143845b

Please sign in to comment.