Skip to content

HttpResponse.disconnect() broken for ApacheHttpTransport #1303

Closed
@rawler

Description

@rawler

When using Apache as the underlying transport, issuing response.getContent().close() blocks waiting for the entire response to finish. If the source is the content from a GCS blob, this can potentially be many GB, which defeats the intention of disconnect().

Calling HttpResponse.disconnect() before .getContent().close() falls on the problem that disconnect() starts by calling getContent().close() before calling LowLevelHttpHandler.disconnect(). The wrong order, compared to the intended way for ApacheHttpClient.

The net effect is that the application-code get's blocked until all the blob-content have been read and discarded.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions