Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402906 )

Change subject: Upgrade to 1.10
......................................................................


Upgrade to 1.10

Bug: T183907
Change-Id: I63e62815461d968dd35d704d1e62fe6fc8af1030
---
M debian/changelog
M setup.py
M tests/integration/test_images_handler.py
M wikimedia_thumbor/handler/images/images.py
4 files changed, 29 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Filippo Giunchedi: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 31a1f0f..d1fe280 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-thumbor-wikimedia (1.10-1) jessie-wikimedia; urgency=low
+
+  * New upstream release
+
+ -- Gilles Dubuc <gil...@wikimedia.org>  Mon, 8 Jan 2018 19:35:00 +0000
+
 python-thumbor-wikimedia (1.9-1) jessie-wikimedia; urgency=low
 
   * New upstream release
diff --git a/setup.py b/setup.py
index 5d9cac0..382d109 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
 
 setup(
     name='wikimedia_thumbor',
-    version='1.9',
+    version='1.10',
     url='https://phabricator.wikimedia.org/diffusion/THMBREXT/',
     license='MIT',
     author='Gilles Dubuc, Wikimedia Foundation',
diff --git a/tests/integration/test_images_handler.py 
b/tests/integration/test_images_handler.py
index 135ffed..0a77310 100644
--- a/tests/integration/test_images_handler.py
+++ b/tests/integration/test_images_handler.py
@@ -37,7 +37,9 @@
         cfg.SWIFT_SHARDED_CONTAINERS = [
             'wikipedia-en-local-public',
             'wikipedia-en-local-temp',
-            'wikipedia-en-local-thumb'
+            'wikipedia-en-local-thumb',
+            'wikipedia-commons-local-public',
+            'wikipedia-commons-local-thumb'
         ]
         cfg.SWIFT_PATH_PREFIX = 'thumbor/'
         cfg.SWIFT_CONNECTION_TIMEOUT = 1
@@ -289,7 +291,7 @@
             '400',
             
'http://swifthost/swift/v1/api/path/wikipedia-en-local-public.d3/archive/d/d3/20160729183014!1Mcolors.jpg',
             'conditional_sharpen(0.0,0.8,1.0,0.0,0.85):format(jpg)',
-            'inline;filename*=UTF-8\'\'20160729183014!1Mcolors.jpg'
+            'inline;filename*=UTF-8\'\'20160729183014%211Mcolors.jpg'
         )
 
     def test_lossless_tiff(self):
@@ -318,7 +320,7 @@
             'http://swifthost/swift/v1/api/path/'
             + 'wikipedia-en-local-public.d3/d/d3/1M\ncolors.tif',
             'format(png):page(1)',
-            None
+            'inline;filename*=UTF-8\'\'1M%0Acolors.tif.png'
         )
 
     def test_question_mark_original(self):
@@ -332,7 +334,21 @@
             '400',
             
'http://swifthost/swift/v1/api/path/wikipedia-en-local-public.d3/d/d3/1M?colors.tif',
             'format(png):page(1)',
-            'inline;filename*=UTF-8\'\'1M?colors.tif.png'
+            'inline;filename*=UTF-8\'\'1M%3Fcolors.tif.png'
+        )
+
+    def test_percentage_original(self):
+        self.run_and_check_headers(
+            
'/wikipedia/commons/thumb/c/ce/Dramatische_daling_insectenpopulatie%2C_75%25_is_verdwenen.webm/800px--Dramatische_daling_insectenpopulatie%2C_75%25_is_verdwenen.webm.jpg',
+            'File:Dramatische_daling_insectenpopulatie,_75%_is_verdwenen.webm',
+            'wikipedia-commons-local-public.ce',
+            'c/ce/Dramatische_daling_insectenpopulatie,_75%_is_verdwenen.webm',
+            'wikipedia-commons-local-thumb.ce',
+            
'thumbor/c/ce/Dramatische_daling_insectenpopulatie,_75%_is_verdwenen.webm/800px--Dramatische_daling_insectenpopulatie,_75%_is_verdwenen.webm.jpg',
+            '800',
+            
'http://swifthost/swift/v1/api/path/wikipedia-commons-local-public.ce/c/ce/Dramatische_daling_insectenpopulatie,_75%_is_verdwenen.webm',
+            'format(jpg)',
+            
'inline;filename*=UTF-8\'\'Dramatische_daling_insectenpopulatie%2C_75%25_is_verdwenen.webm.jpg'
         )
 
     def test_temp(self):
@@ -346,7 +362,7 @@
             '71',
             
'http://swifthost/swift/v1/api/path/wikipedia-en-local-temp.57/5/57/20161115090130!fYJSjm.pdf',
             'format(jpg):page(1)',
-            'inline;filename*=UTF-8\'\'20161115090130!fYJSjm.pdf.jpg'
+            'inline;filename*=UTF-8\'\'20161115090130%21fYJSjm.pdf.jpg'
         )
 
     def run_and_check_error(
diff --git a/wikimedia_thumbor/handler/images/images.py 
b/wikimedia_thumbor/handler/images/images.py
index 9094809..6c6e933 100644
--- a/wikimedia_thumbor/handler/images/images.py
+++ b/wikimedia_thumbor/handler/images/images.py
@@ -335,7 +335,7 @@
 
         self.safe_set_header(
             'Content-Disposition',
-            u'inline;filename*=UTF-8\'\'%s' % content_disposition
+            u'inline;filename*=UTF-8\'\'%s' % 
quote(content_disposition.encode('utf-8'))
         )
 
         self.safe_set_header(

-- 
To view, visit https://gerrit.wikimedia.org/r/402906
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I63e62815461d968dd35d704d1e62fe6fc8af1030
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/python-thumbor-wikimedia
Gerrit-Branch: master
Gerrit-Owner: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to