Skip to content

Commit

Permalink
prevent Content-Length header from having wrong byte length
Browse files Browse the repository at this point in the history
  • Loading branch information
buffermet committed Jan 10, 2020
1 parent 554c7c8 commit ed5a3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion download-autopwn/download-autopwn.js
Expand Up @@ -71,7 +71,7 @@ function onResponse(req, res) {
// Set Content-Disposition header to enforce file download instead of in-browser preview
res.SetHeader("Content-Disposition", "attachment; filename=\"" + requestedFileName + "\"")
// Update Content-Length header
res.SetHeader("Content-Length", payload.length)
res.RemoveHeader("Content-Length")
logStr += redLine +
redLine + " Serving your payload to " + boldRed + req.Client.IP + reset + "...\n"
log(logStr)
Expand Down

1 comment on commit ed5a3de

@buffermet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closes ed5a3de

Please sign in to comment.