Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-5030

Content-Length header should be removed when responding to downloads with a 304 status code

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.6.1
    • Fix Version/s: 2.6.2
    • Component/s: Downloader
    • Labels:
      None

      Description

      Creating the content-length header and settings it to a non-zero value when the response body is empty seems to be in violation of RFC-2616 (page 52).
      The content length header should not be added at all.

      This also causes WebLogic to throw an exception:

      ####<Jun 26, 2012 4:20:02 PM GMT> <Error> <HTTP> <CLSITA03D> <VWV-MS-3> 
      <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default 
      (self-tuning)'> <<WLS Kernel>> <> 
      <848107a3740a82bd:-71f8dc07:1380eed6709:-8000-0000000000007cfa> 
      <1340727602721> <BEA-101104> <Servlet execution in servlet context 
      "ServletContext@470489645[app:artifactory-ear-2.6.1 module:/artifactory 
      path:/artifactory spec-version:2.5]" failed, java.net.ProtocolException: 
      Didn't meet stated Content-Length, wrote: '0' bytes instead of stated: 
      '32618' bytes..
      java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '0' 
      bytes instead of stated: '32618' bytes.
      at 
      weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:422)
      at 
      weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
      at 
      weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1506)
      at weblogic.servlet.internal.ServletRequestImpl.run(Unknown 
      Source)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
      

        Attachments

          Activity

            People

            • Assignee:
              shayy Shay Yaakov (Inactive)
              Reporter:
              noam.tenne Noam Y. Tenne (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: