if ((script = [[self readString] autorelease]) == nil)
return nil;
+ if ([script hasPrefix:@"O "] || [script hasPrefix:@"NO "]) {
+ // TODO: not exactly correct, script could begin with this signature
+ // Note: readString read 'NO ...', but the first char is consumed
+
+ [self logWithFormat:@"ERROR: status line reports: '%@'", script];
+ return nil;
+ }
+
+ NSLog(@"str: %@", script);
+
/* read response code */
if ((s = [self readStringToCRLF]) == nil) {
return [self readQuoted];
if (c1 == '{')
return [self readLiteral];
-
+
+ // Note: this does not return the first char!
return [self readStringToCRLF];
}