Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp file is not deleted when request is aborted by client #1916

Closed
kedemd opened this issue Sep 8, 2014 · 0 comments
Closed

Temp file is not deleted when request is aborted by client #1916

kedemd opened this issue Sep 8, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@kedemd
Copy link

@kedemd kedemd commented Sep 8, 2014

hapi 6.7.1
when a request is aborted by the client while uploading a file, part of the file is written to "../tmp" folder and it is not deleted after the request was aborted.

Using the following payload configuration in a route:

payload:{
        maxBytes:150000000,
        output:'file',
        parse: true,
    uploads: __dirname + '/../tmp'
    }

console output:

Debug: hapi, request, error, aborted 
Debug: hapi, payload, error 
    Error: Invalid multipart payload format
    at Object.exports.create (C:\example\node_modules\hapi\node_modules\boom\lib\index.js:21:17)
    at Object.exports.badRequest (C:\example\node_modules\hapi\node_modules\boom\lib\index.js:79:20)
    at Form.internals.multipart.onError (C:\example\node_modules\hapi\lib\payload.js:295:26)
    at Form.g (events.js:180:16)
    at Form.EventEmitter.emit (events.js:117:20)
    at handleError (C:\example\node_modules\hapi\node_modules\multiparty\index.js:196:12)
    at IncomingMessage.onReqAborted (C:\example\node_modules\hapi\node_modules\multiparty\index.js:175:5)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at abortIncoming (http.js:1911:11)
    at Socket.serverSocketCloseListener (http.js:1923:5)
Debug: hapi, request, error, closed 
Debug: hapi, response, error, close 
@kedemd kedemd changed the title File is not deleted when request is aborted by client Temp file is not deleted when request is aborted by client Sep 9, 2014
@hueniverse hueniverse added the bug label Nov 7, 2014
@hueniverse hueniverse self-assigned this Nov 7, 2014
@hueniverse hueniverse added this to the 7.4.1 milestone Nov 7, 2014
@hueniverse hueniverse closed this in 64d7852 Nov 7, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants