@@ -14,14 +14,13 @@ * file. */ #include "config.h" -#include #include - #include +#include #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFString.h" @@ -119,18 +118,14 @@ } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)length { - if (_atEndOfStream) { - OFReadFailedException *e; - - e = [OFReadFailedException exceptionWithObject: self - requestedLength: length]; - e->_errNo = ENOTCONN; - @throw e; - } + if (_atEndOfStream) + @throw [OFReadFailedException exceptionWithObject: self + requestedLength: length + errNo: ENOTCONN]; if (!_hasContentLength && !_chunked) return [_socket readIntoBuffer: buffer length: length];