[Checkins] [zopefoundation/Zope] 7574d9: Fix export of files with non-latin-1 compatible na...

Jürgen Gmach noreply at github.com
Wed Sep 30 11:29:40 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/Zope
  Commit: 7574d9d040e6573b6536ff049a0d4057198c5446
      https://github.com/zopefoundation/Zope/commit/7574d9d040e6573b6536ff049a0d4057198c5446
  Author: Jürgen Gmach <juergen.gmach at googlemail.com>
  Date:   2020-09-30 (Wed, 30 Sep 2020)

  Changed paths:
    M CHANGES.rst
    M src/OFS/ObjectManager.py
    M src/Testing/ZopeTestCase/testZODBCompat.py
    M src/ZPublisher/HTTPResponse.py
    M src/ZPublisher/tests/testHTTPResponse.py

  Log Message:
  -----------
  Fix export of files with non-latin-1 compatible names (#893)

* Fix export of files with non-latin-1 compatible names

With Zope 4 unicode characters for ids are allowed.

The `zexp` export was not updated yet.

This has been fixed now.

closes #890

modified:   CHANGES.rst
modified:   src/OFS/ObjectManager.py
modified:   src/Testing/ZopeTestCase/testZODBCompat.py
new file:   src/ZPublisher/http_header_utils.py
new file:   src/ZPublisher/tests/test_http_header_utils.py

* Fix white space

modified:   src/ZPublisher/tests/test_http_header_utils.py

* Implement custom code for header creation

The ZPL does not allow to vendor third party code except the original
author would sign the contributor agreement.

As this is not realistic in this case, a custom solution was implemented
to handle non-latin-1 compatible headers.

modified:   src/OFS/ObjectManager.py
modified:   src/ZPublisher/http_header_utils.py
modified:   src/ZPublisher/tests/test_http_header_utils.py

* Update year

modified:   src/ZPublisher/tests/test_http_header_utils.py

* Use `us-ascii` encoding for the content-disposition header

modified:   src/Testing/ZopeTestCase/testZODBCompat.py
modified:   src/ZPublisher/http_header_utils.py
modified:   src/ZPublisher/tests/test_http_header_utils.py

* Move `make_content_disposition` into `HTTPResponse` module

modified:   src/OFS/ObjectManager.py
modified:   src/ZPublisher/HTTPResponse.py
deleted:    src/ZPublisher/http_header_utils.py
modified:   src/ZPublisher/tests/testHTTPResponse.py
deleted:    src/ZPublisher/tests/test_http_header_utils.py

Co-authored-by: Jens Vagelpohl <jens at netz.ooo>




More information about the checkins mailing list