Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-584

LightweightHttpWagon and tests are built on false assumptions around internal buffering

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.4
    • Fix Version/s: None
    • Component/s: wagon-http-lightweight
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michael-o Michael Osipov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: