Skip to content
This repository

Update ObjC/PonyDebugger/PDNetworkDomainController.m #26

Merged
merged 1 commit into from over 1 year ago

2 participants

Tyler Powers Mike Lewis
Tyler Powers

fix for when trying to make a request that has no HTTP body, we get a crash

Tyler Powers Update ObjC/PonyDebugger/PDNetworkDomainController.m
fix for when trying to make a request that has no HTTP body, we get a crash
499ddbf
Mike Lewis mikelikespie merged commit 1434ed7 into from
Mike Lewis mikelikespie closed this
Mike Lewis
Owner

Looks great! Thanks again.

David Apgar davidapgar referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 25, 2012
Tyler Powers Update ObjC/PonyDebugger/PDNetworkDomainController.m
fix for when trying to make a request that has no HTTP body, we get a crash
499ddbf
This page is out of date. Refresh to see the latest.
2  ObjC/PonyDebugger/PDNetworkDomainController.m
@@ -609,7 +609,7 @@ - (id)initWithURLRequest:(NSURLRequest *)request
609 609
     
610 610
     NSString *contentType = [request valueForHTTPHeaderField:@"Content-Type"];
611 611
     // Do some trivial redacting here.  In particular, redact password 
612  
-    if (contentType && [contentType rangeOfString:@"json"].location != NSNotFound) {
  612
+    if (body && contentType && [contentType rangeOfString:@"json"].location != NSNotFound) {
613 613
         NSMutableDictionary *obj = [NSJSONSerialization JSONObjectWithData:body options:0 error:NULL];
614 614
         if ([obj isKindOfClass:[NSDictionary class]] && [obj objectForKey:@"password"]) {
615 615
             obj = [obj mutableCopy];
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.