Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-119

[PATCH] FilePart fails to send data on second call to send

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0 Beta 1
    • HttpClient (classic)
    • None
    • Operating System: other
      Platform: Other
    • 13676

    Description

      When using a FilePart with the MultipartPostMethod and a server that requires
      authentication, the first call to FilePart.send() sends the data correctly and
      HttpClient receives an unauthorized response from the server. If HttpClient is
      set to automatically handle authentication attempts it then attempts to send
      the FilePart again at which time the InputStream FilePart reads from is empty
      so it doesn't send any data.

      Due to this, the data actually sent by HttpClient doesn't match the content
      length specified so the server continues to wait for the data and doesn't
      respond, leaving HttpClient to timeout while waiting for a response.

      This occurs with the latest source from CVS as of 16 October 2002.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--TestPartsNoHost.java
          7 kB
          Adrian Sutton
        2. ASF.LICENSE.NOT.GRANTED--filepart3.patch
          5 kB
          Adrian Sutton
        3. ASF.LICENSE.NOT.GRANTED--filepart2.patch
          4 kB
          Adrian Sutton
        4. ASF.LICENSE.NOT.GRANTED--filepart.patch
          1 kB
          Adrian Sutton
        5. ASF.LICENSE.NOT.GRANTED--addPartsTest.patch
          0.6 kB
          Adrian Sutton

        Activity

          People

            adrian@ephox.com Adrian Sutton
            adrian@ephox.com Adrian Sutton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: