Skip to content

Should newTalkToApstraErr() be Close()ing resp.Body? #519

Open
@chrismarget-j

Description

@chrismarget-j

In the case of a login attempt, resp.Body is explicitly closed.

Shouldn't it be closed in all cases?

Need to audit calls to newTalkToApstraErr()... Ensure that resp.Body is never closed by callers and then ensure that newTalkToApstraErr() always closes it.

In addition... Ensure that all paths out of newTalkToApstraErr() return an io.NopCloser as resp.Body, so that what happens downstream is irrelevant.

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