Skip to content

net/http: finishRequest() fails to clean up files generated after modifying request using context #67713

Closed as not planned
@10196

Description

@10196

Go version

go1.20.6

Output of go env in your module/workspace:

Regardless of env

What did you do?

Before executing net/http Request.ParseMultipartForm(), execute request = request.WithContext(ctx). The temporary file /tmp/multipart- generated afterwards will not be deleted in response.finishRequest().

What did you see happen?

The temporary file /tmp/multipart- will remain and will not be deleted.

What did you expect to see?

No matter what the order of executing Request.ParseMultipartForm and request = request.WithContext(ctx), finishRequest() can always delete the temporary file: /tmp/multipart-.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions