@@ -39,20 +39,12 @@ #ifdef OF_HAVE_FILES # import "OFFile.h" # import "OFFileManager.h" #endif #import "OFURL.h" -#ifdef OF_HAVE_SOCKETS -# import "OFHTTPClient.h" -# import "OFHTTPRequest.h" -# import "OFHTTPResponse.h" -#endif #import "OFXMLElement.h" -#ifdef OF_HAVE_SOCKETS -# import "OFHTTPRequestFailedException.h" -#endif #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" @@ -1050,30 +1042,10 @@ encoding = OF_STRING_ENCODING_UTF_8; self = [self initWithContentsOfFile: [URL path] encoding: encoding]; } else -# endif -# ifdef OF_HAVE_SOCKETS - if ([scheme isEqual: @"http"] || [scheme isEqual: @"https"]) { - bool mutable = [self isKindOfClass: [OFMutableString class]]; - OFHTTPClient *client = [OFHTTPClient client]; - OFHTTPRequest *request = [OFHTTPRequest requestWithURL: URL]; - OFHTTPResponse *response = [client performRequest: request]; - - if ([response statusCode] != 200) - @throw [OFHTTPRequestFailedException - exceptionWithRequest: request - response: response]; - - [self release]; - - if (mutable) - self = [[response string] mutableCopy]; - else - self = [[response string] copy]; - } else # endif @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; objc_autoreleasePoolPop(pool);