Skip to content

[WAGON-584] LightweightHttpWagon and tests are built on false assumptions around internal buffering #645

@jira-importer

Description

@jira-importer

Michael Osipov opened WAGON-584 and commented

The LightweightHttpWagon heavily differs from HttpWagon internally, the way HttpURLConnection is implemented it is virtually impossible to make them behave similar (or identical).

Notable differences:

  • Expect Continue is virtually not supported and signals an exception as soon as non-2xx is received
  • All content is buffered in a byte array making it extremely inefficient with large uploads
  • As soon as streaming mode is enabled (see HttpURLConnection#setFixedLengthStreamingMode(long) and HttpURLConnection#setChunkedStreamingMode(int)) redirect and authentication support are disabled

Tests do assume that both behave the same although HttpWagon is fully streaming while the other one is not. So, the tests are illdesigned/based on false assumptions. Run branches WAGON-584_streaming/WAGON-584_streaming_no-expect-continue and see the failures.

This behavior is nowhere documented and not properly covered in tests.


Affects: 3.3.4

Issue Links:

  • WAGON-615 Deprecate Wagon HTTP Lightweight Provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions