Skip to content

Drop InputStreamBodyGenerator marking strategy #760

Closed
@slandelle

Description

@slandelle

I think the original intention was to find a way to replay InputStream bodies in case of a retry (connection crash), but I don't think it can work:

  • it sets the readlimit to 0, meaning that the mark becomes invalid after the first read
  • reset behavior is completely inconsistent across implementations. A ByteArrayInputStream will always be able to reset as everything is in memory, but a BufferedInputStream will crash on reset if the mark moved out of the buffer, while markSupported always return true (so there's no way to detect that reset will fail beforehand).

Dropping this non feature that cannot work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions