Tweaked the HTTP Connection class so it uses ASCII encoding.
parent
a19e3f3b8c
commit
d468f240e7
|
@ -206,6 +206,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||||
|
@ -228,6 +229,7 @@
|
||||||
ppc,
|
ppc,
|
||||||
i386,
|
i386,
|
||||||
);
|
);
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
|
|
|
@ -85,8 +85,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
NSInteger lineLength = ((uint8_t *)newLine - (uint8_t *)_buffer);
|
NSInteger lineLength = ((uint8_t *)newLine - (uint8_t *)_buffer);
|
||||||
NSString *line = [[NSString alloc] initWithBytes:_buffer length:lineLength encoding:NSUTF8StringEncoding];
|
NSString *line = [[NSString alloc] initWithBytes:_buffer length:lineLength encoding:NSASCIIStringEncoding];
|
||||||
NSLog(@"Received line: !%@!", line);
|
NSLog(@"Received line: \"%@\"", line);
|
||||||
memmove(_buffer, _buffer + lineLength + 2, _bufferSize - lineLength); // + 2 to skip the newline!
|
memmove(_buffer, _buffer + lineLength + 2, _bufferSize - lineLength); // + 2 to skip the newline!
|
||||||
_bufferSize -= lineLength;
|
_bufferSize -= lineLength;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue