]> git.ipfire.org Git - thirdparty/tornado.git/commit
httputil: Fix support for non-latin1 filenames in multipart uploads
authorBen Darnell <ben@bendarnell.com>
Thu, 22 May 2025 14:59:48 +0000 (10:59 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 22 May 2025 14:59:48 +0000 (10:59 -0400)
commit170a58af2c1708c22529daf37536b6ba63403fd0
tree0e070840b4e5ca57fd31b5cfabee3edb6010b2e7
parentab5f35431242f95a5ef0a2ac228e54e89ab511f0
httputil: Fix support for non-latin1 filenames in multipart uploads

The change to be stricter about characters allowed in HTTP headers
inadvertently broke support for non-latin1 filenames in multipart
uploads (this was missed in testing because our i18n test case only
used characters in latin1). This commit adds a hacky workaround without
changing any APIs to make it safe for a 6.5.1 patch release; a more
robust solution will follow for future releases.

Fixes #3502
tornado/httputil.py
tornado/test/httputil_test.py