Skip to content

Commit

Permalink
getRangeFromHeaderValue: Return range start at zero
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Mar 16, 2024
1 parent 4e6f14d commit 0c5566f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Hummingbird/Files/FileMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c5566f

Please sign in to comment.