Index: src/OFHTTPServer.m ================================================================== --- src/OFHTTPServer.m +++ src/OFHTTPServer.m @@ -365,10 +365,11 @@ pos = [value rangeOfString: @":" options: OF_STRING_SEARCH_BACKWARDS].location; if (pos != OF_NOT_FOUND) { + [host release]; host = [[value substringWithRange: of_range(0, pos)] retain]; @try { of_range_t range = @@ -382,10 +383,11 @@ port = (uint16_t)portTmp; } @catch (OFInvalidFormatException *e) { return [self sendErrorAndClose: 400]; } } else { + [host release]; host = [value retain]; port = 80; } } @@ -446,11 +448,11 @@ if (HTTPMinorVersion > 0) { [self sendErrorAndClose: 400]; return; } - host = [server host]; + host = [[server host] retain]; port = [server port]; } URL = [OFURL URL]; [URL setScheme: @"http"];