Skip to content

Commit

Permalink
remove any leading whitespace in STOMPFrameFromData
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesnil committed Feb 20, 2014
1 parent 755c5a3 commit d1d7fe5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions StompKit/StompKit.m
Expand Up @@ -119,9 +119,9 @@ + (STOMPFrame *) STOMPFrameFromData:(NSData *)data {
NSString *msg = [[NSString alloc] initWithData:strData encoding:NSUTF8StringEncoding];
LogDebug(@"<<< %@", msg);
NSMutableArray *contents = (NSMutableArray *)[[msg componentsSeparatedByString:kLineFeed] mutableCopy];
if([[contents objectAtIndex:0] isEqual:@""]) {
[contents removeObjectAtIndex:0];
}
while ([contents count] > 0 && [contents[0] isEqual:@""]) {
[contents removeObjectAtIndex:0];
}
NSString *command = [[contents objectAtIndex:0] copy];
NSMutableDictionary *headers = [[NSMutableDictionary alloc] init];
NSMutableString *body = [[NSMutableString alloc] init];
Expand Down

0 comments on commit d1d7fe5

Please sign in to comment.