Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40040

direct/profile/{userid}/image sent without correct HTTP headers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 11.5 [Tentative], 12.2, 19.0
    • Fix Version/s: None
    • Component/s: Profile
    • Labels:
      None

      Description

      Images loaded through the handy direct link,

      /direct/profile/{userid}/image

      are displaying as garbled text when called directly. The cause appears to be that the image is being sent with the Content-Type: text/html;charset=UTF-8

      Steps to reproduce:

      • click on the user profile image in the top right corner and select profile
      • from the profile page, change your profile picture to the attached image apereo tiger pink.png
      • and click upload
      • in the browser's address bar, change the url to either of these urls
        • /direct/profile/{userid}/image
        • /direct/profile/{userid}/image/thumb
      • instead of rendering the profile image, there will be garbage character on the screen
      • see attachment 2011-03-22_0859.png

      Here's a comparison of the headers on our production system with Profile2 1.3.9 and the 1.3.12 system we're testing out:

      1.3.9:
      x-entity-prefix: profile
      Date: Tue, 19 Oct 2010 19:09:48 GMT
      x-sdata-url: /profile/mclare/image
      x-entity-url: /profile/mclare.html
      x-sdata-handler: org.sakaiproject.profile2.entity.ProfileEntityProviderImpl
      x-entity-reference: /profile/mclare
      Content-Length: 25774
      Last-Modified: Tue, 19 Oct 2010 19:09:48 GMT
      Server: Apache-Coyote/1.1
      ETag: 1287515388164
      Content-Type: image/jpeg;charset=BASE64
      x-entity-format: html
      Cache-Control: public, max-age=600, s-maxage=600
      Expires: Tue, 19 Oct 2010 19:19:48 GMT

      200 OK

      1.3.12

      x-entity-prefix: profile
      Date: Tue, 19 Oct 2010 19:11:33 GMT
      x-sdata-url: /profile/mclare/image
      x-entity-url: /profile/mclare.html
      x-sdata-handler: org.sakaiproject.profile2.entity.ProfileEntityProviderImpl
      x-entity-reference: /profile/mclare
      Last-Modified: Tue, 19 Oct 2010 19:11:33 GMT
      Server: Apache-Coyote/1.1
      ETag: 1287515493186
      Content-Type: text/html;charset=UTF-8
      x-entity-format: html
      Cache-Control: public, max-age=600, s-maxage=600
      Expires: Tue, 19 Oct 2010 19:21:33 GMT

      200 OK

      The problem also happens with the current 2.7.1 sakai-demo build and http://nightly2.sakaiproject.org/

        Gliffy Diagrams

          Attachments

          1. 2011-03-22_0859.png
            232 kB
            Austin
          2. apereo tiger pink.png
            13 kB
            Austin
          3. sakai.jpg
            15 kB
            Austin

            Issue Links

              Activity

                People

                • Assignee:
                  steve.swinsburg Steve Swinsburg
                  Reporter:
                  austinUH Austin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Git Source Code