Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
fix: Duplicate Content-Length
Browse files Browse the repository at this point in the history
  • Loading branch information
asforest committed Sep 21, 2022
1 parent 088720a commit ed8c29e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/kotlin/ResponseHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ object ResponseHelper
"application/octet-stream",
FileInputStream(file._file),
file.length.toInt().toLong()
).also {
it.addHeader("Content-Length", file.length.toString())
}
)
} catch (e: IOException) {
buildForbiddenResponse("Reading file failed.")
}
Expand Down

0 comments on commit ed8c29e

Please sign in to comment.