From 0c5566f65574bda88df2325b84dac3a83cdaff1d Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Sat, 16 Mar 2024 08:51:50 +0000 Subject: [PATCH] getRangeFromHeaderValue: Return range start at zero --- Sources/Hummingbird/Files/FileMiddleware.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Hummingbird/Files/FileMiddleware.swift b/Sources/Hummingbird/Files/FileMiddleware.swift index 91ef29b32..2905af0e4 100644 --- a/Sources/Hummingbird/Files/FileMiddleware.swift +++ b/Sources/Hummingbird/Files/FileMiddleware.swift @@ -235,7 +235,7 @@ extension FileMiddleware { if groups[1] == "" { guard let upperBound = Int(groups[2]) else { return nil } - return Int.min...upperBound + return 0...upperBound } else if groups[2] == "" { guard let lowerBound = Int(groups[1]) else { return nil } return lowerBound...Int.max