Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-1148

cdnify incorrectly unquotes part of a s3.amazonaws.com URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 2.2.9cm
    • Server - Core
    • None

      When cdnify("http://s3.amazonaws.com/bucket-with-cdn.com/path+with+spaces/cover.jpg") knows about a CDN for 'bucket-with-cdn.com', it returns an invalid URL: "http://cdn/path with spaces/cover.jpg")

      This is because S3Uploader.bucket_and_filename assumes you are interested in "path+with+spaces/cover.jpg" as the name of the item on S3, not the URL to the item. It calls urllib.unquote_plus on the filename. Since cdnify is interested in the item's URL, not its name, unquote_plus should not be called here.

      I have a fix for this but I need to write tests for it.

            leonardrichardson Leonard Richardson [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: