diff --git a/Sources/Vapor/Middleware/FileMiddleware.swift b/Sources/Vapor/Middleware/FileMiddleware.swift index d1c4b6867..f7a45b8ec 100644 --- a/Sources/Vapor/Middleware/FileMiddleware.swift +++ b/Sources/Vapor/Middleware/FileMiddleware.swift @@ -40,7 +40,7 @@ public final class FileMiddleware: Middleware { /// an absolute path from the public directory root. If `nil`, no default files are served. /// - directoryAction: Determines the action to take when the request doesn't have a trailing slash but matches a directory. /// - advancedETagComparison: The method used when ETags are generated. If true, a byte-by-byte hash is created (and cached), otherwise a simple comparison based on the file's last modified date and size. - public init(publicDirectory: String, defaultFile: String? = nil, directoryAction: DirectoryAction = .none, advancedETagComparison: Bool = true) { + public init(publicDirectory: String, defaultFile: String? = nil, directoryAction: DirectoryAction = .none, advancedETagComparison: Bool = false) { self.publicDirectory = publicDirectory.addTrailingSlash() self.defaultFile = defaultFile self.directoryAction = directoryAction diff --git a/Sources/Vapor/Utilities/FileIO.swift b/Sources/Vapor/Utilities/FileIO.swift index 7a3820989..426ba9f1d 100644 --- a/Sources/Vapor/Utilities/FileIO.swift +++ b/Sources/Vapor/Utilities/FileIO.swift @@ -123,7 +123,6 @@ public struct FileIO: Sendable { /// - mediaType: HTTPMediaType, if not specified, will be created from file extension. /// - onCompleted: Closure to be run on completion of stream. /// - returns: A `200 OK` response containing the file stream and appropriate headers. - @available(*, deprecated, message: "Use the new `streamFile` method which returns EventLoopFuture") @preconcurrency public func streamFile( at path: String, chunkSize: Int = NonBlockingFileIO.defaultChunkSize,