Skip to content

Restlet 2.1.2 - FileRepresentation leaves files locked #760

Open
@scbydoo

Description

@scbydoo

org.restlet.representation.FileRepresentation.write (all three variants) creates an anonymous stream/channel/reader to read the file being served. If an exception occurs (e.g the client cancels the request) the handle is never closed.
The copy calls should be wrapped in a try/finally to ensure the file is closed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions