Skip to content

Unable to read /proc/* files #212

Closed
Closed

Description

@mleblebici

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.

Activity

  1. mleblebici commented on Jul 3, 2022

    @mleblebici
    Author

    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.

  2. wesleytodd commented on May 17, 2024

    @wesleytodd
    Member

    Closing this in favor of the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions