Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-17101

PartialFetchHandler produces invalid HTTP responses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.11.0, 3.12.0
    • Fix Version/s: 3.13.0
    • Component/s: Repository
    • Labels:
      None
    • Story Points:
      1

      Description

      Any URL that has PartialFetchHandler involved produces invalid HTTP responses.

      This was reported against the Nexus APT community plugin here: https://github.com/sonatype-nexus-community/nexus-repository-apt/issues/47

      I looked into this, and it looks like PartialFetchHandler sends an invalid Content-Range header here: https://github.com/sonatype/nexus-public/blob/82d58ec7e1464cf25efca423bbe5f8cbd6eb4f55/components/nexus-repository/src/main/java/org/sonatype/nexus/repository/http/PartialFetchHandler.java#L119

      According to the RFC (https://tools.ietf.org/html/rfc7233#section-4.2) the Content-Range header needs a unit specifier of "bytes" in it.

      Also, it seems like the base code doesn't correctly handle the If-Range header. I have a PR that fixes both issues if you want to merge to the base code: mpoindexter/nexus-public#1

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jbryan Jeremy Bryan
              Reporter:
              staticsnow@gmail.com Mike Poindexter
              Last Updated By:
              Rich Seddon
              Team:
              Nexus - Core
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title