Closed mleblebici closed 5 months ago
I created this pull request to overcome this problem. I tested it with following PoC application.
const express = require('express')
const app = express()
app.get('/get', (req,res) => {
res.download(req.query.filename)
})
app.listen(12345, function(error) {
console.log(error)
})
It worked for /proc/* files, it also did not break anything for other valid files. I tried non-existing files, they are returning 404 as expected. For getSize function, I mainly modified the read function of nodejs-procfs.
Closing this in favor of the PR.
As discussed in this issue, send library is not able to return contents of files in /proc directory. It is mostly because of /proc is a pseudo file system.