@@ -52,11 +52,11 @@ didAcceptSocket: (OFTCPSocket*)clientSocket exception: (OFException*)exception; @end static const char* -status_code_to_string(short code) +statusCodeToString(short code) { switch (code) { case 100: return "Continue"; case 101: @@ -141,11 +141,11 @@ return NULL; } } static OF_INLINE OFString* -normalized_key(OFString *key) +normalizedKey(OFString *key) { char *cString = strdup([key UTF8String]); uint8_t *tmp = (uint8_t*)cString; bool firstLetter = true; @@ -215,11 +215,11 @@ [_socket writeFormat: @"HTTP/%@ %d %s\r\n" @"Server: %@\r\n" @"Date: %@\r\n", [self protocolVersionString], _statusCode, - status_code_to_string(_statusCode), + statusCodeToString(_statusCode), [_server name], date]; keyEnumerator = [_headers keyEnumerator]; valueEnumerator = [_headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && @@ -479,11 +479,11 @@ key = [line substringWithRange: of_range(0, pos)]; value = [line substringWithRange: of_range(pos + 1, [line length] - pos - 1)]; - key = normalized_key([key stringByDeletingTrailingWhitespaces]); + key = normalizedKey([key stringByDeletingTrailingWhitespaces]); value = [value stringByDeletingLeadingWhitespaces]; [_headers setObject: value forKey: key]; @@ -553,11 +553,11 @@ [_socket writeFormat: @"HTTP/1.1 %d %s\r\n" @"Date: %@\r\n" @"Server: %@\r\n" @"\r\n", - statusCode, status_code_to_string(statusCode), + statusCode, statusCodeToString(statusCode), date, [_server name]]; [_socket close]; return false; }