@@ -313,12 +313,11 @@ response.headers = _serverHeaders; connectionHeader = [_serverHeaders objectForKey: @"Connection"]; if ([_version isEqual: @"1.1"]) { if (connectionHeader != nil) - keepAlive = ([connectionHeader caseInsensitiveCompare: - @"close"] != OF_ORDERED_SAME); + keepAlive = [connectionHeader isEqual: @"close"]; else keepAlive = true; } else { if (connectionHeader != nil) keepAlive = ([connectionHeader caseInsensitiveCompare: @@ -693,11 +692,12 @@ uint16_t port; OFNumber *URLPort; [_client close]; - if ([URL.scheme isEqual: @"https"]) { + if ([URL.scheme caseInsensitiveCompare: @"https"] == + OF_ORDERED_SAME) { if (of_tls_socket_class == Nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; sock = [[[of_tls_socket_class alloc] init] autorelease]; @@ -1245,11 +1245,12 @@ { void *pool = objc_autoreleasePoolPush(); OFURL *URL = request.URL; OFString *scheme = URL.scheme; - if (![scheme isEqual: @"http"] && ![scheme isEqual: @"https"]) + if ([scheme caseInsensitiveCompare: @"http"] != OF_ORDERED_SAME && + [scheme caseInsensitiveCompare: @"https"] != OF_ORDERED_SAME) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; if (_inProgress) /* TODO: Find a better exception */ @throw [OFAlreadyConnectedException exception];