Uploaded image for project: 'Image Archives'
  1. Image Archives
  2. IMG-27

Content-Length invalid for HEAD requests for artwork

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None

      When I make a HEAD request for an image in the Cover Art Archive I get
      a content length of 1 for the image.

      My understanding is that either the Content-Length should be equal to
      the length of the content if I had made a GET request, or the header
      should be absent (ref
      http://stackoverflow.com/questions/3854842/content-length-header-with-head-requests
      ).

      Sample HEAD request:

      Request
      HEAD http://ia601207.s3dns.us.archive.org/mbid-fb70321f-78df-30ff-92de-21a4bc9ca16c/mbid-fb70321f-78df-30ff-92de-21a4bc9ca16c-900033833.jpg
      Headers:
      [Accept-Encoding: gzip
      , User-Agent: bliss/Development mode +http://www.blisshq.com
      , Host: ia601207.s3dns.us.archive.org
      ]

      Response

      Headers:
      [Server: nginx/0.8.54
      , Date: Wed, 23 May 2012 09:26:26 GMT
      , Content-Type: image/jpeg
      , Connection: keep-alive
      , Accept-Ranges: bytes
      , Content-Length: 1
      , x-upload-date: 2012-05-09T02:13:11.000Z
      , x-archive-meta-collection: coverartarchive
      , last-modified: Wed, 09 May 2012 02:13:02 GMT
      , ETag: "4ee00e1e2fbace73636d4f2633f7d2ef"
      , x-archive-auto-make-bucket: 1
      , x-archive-meta-mediatype: images
      , Expires: Wed, 23 May 2012 15:26:26 GMT
      , Cache-Control: max-age=21600
      ]

      Equivalent GET request:

      Request
      GET http://ia601207.s3dns.us.archive.org/mbid-fb70321f-78df-30ff-92de-21a4bc9ca16c/mbid-fb70321f-78df-30ff-92de-21a4bc9ca16c-900033833.jpg
      Headers:
      [Accept-Encoding: gzip
      , User-Agent: bliss/Development mode +http://www.blisshq.com
      , Host: ia601207.s3dns.us.archive.org
      ]

      Response

      Headers:
      [Server: nginx/0.8.54
      , Date: Wed, 23 May 2012 09:28:26 GMT
      , Content-Type: image/jpeg
      , Connection: keep-alive
      , Accept-Ranges: bytes
      , access-control-allow-headers:
      authorization,x-amz-acl,x-amz-auto-make-bucket,cache-control,x-requested-with,x-file-name,x-file-size,x-archive-ignore-preexisting-bucket,x-archive-meta-title,x-archive-meta-description,x-archive-meta-language,x-archive-meta-mediatype,x-archive-meta01-subject,x-archive-meta02-subject,x-archive-meta03-subject,x-archive-meta04-subject,x-archive-meta05-subject,x-archive-meta01-collection,x-archive-meta02-collection
      , x-upload-date: 2012-05-09T02:13:11.000Z
      , x-archive-meta-collection: coverartarchive
      , last-modified: Wed, 09 May 2012 02:13:02 GMT
      , ETag: "4ee00e1e2fbace73636d4f2633f7d2ef"
      , x-archive-auto-make-bucket: 1
      , access-control-allow-origin: *
      , access-control-allow-methods: GET,POST,PUT,DELETE
      , x-archive-meta-mediatype: images
      , Content-Length: 383681
      , Expires: Wed, 23 May 2012 15:28:26 GMT
      , Cache-Control: max-age=21600
      ]

      Note the difference in Content-Length.

          [IMG-27] Content-Length invalid for HEAD requests for artwork

          Robert Kaye added a comment -

          Thanks for the feedback. Sadly this bug is in one of their tools (apache, I believe) and they will need to do a bunch of architecting to remove this bug. This means that splitting this issue into two doesn't really help matters along any.

          Robert Kaye added a comment - Thanks for the feedback. Sadly this bug is in one of their tools (apache, I believe) and they will need to do a bunch of architecting to remove this bug. This means that splitting this issue into two doesn't really help matters along any.

          Dan Gravell added a comment -

          Not very... it would be a nice optimisation to be able to look ahead to know how large the image will be. This could be separated into two items:

          1) a bug: the content-length is incorrect (so remove it) and
          2) an enhancement: add an accurate content-length

          Dan Gravell added a comment - Not very... it would be a nice optimisation to be able to look ahead to know how large the image will be. This could be separated into two items: 1) a bug: the content-length is incorrect (so remove it) and 2) an enhancement: add an accurate content-length

          Robert Kaye added a comment -

          This bug is acknowledged by the IA, but will take some time. How important is this?

          Robert Kaye added a comment - This bug is acknowledged by the IA, but will take some time. How important is this?

            Unassigned Unassigned
            gravelld Dan Gravell
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                Version Package