Uploaded image for project: 'Cover Art Archive'
  1. Cover Art Archive
  2. CAA-27

Content-Length invalid for HEAD requests for artwork

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • 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.

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

              Created:
              Updated:

                Version Package