After digging, we believe that the issue comes from https://opendev.org/openstack/swift/src/commit/9a1bfb8975fb1315fb417161a2865b6bb4760415/swift/obj/diskfile.py#L181-L185 where the string encoded in latin1 with python2 is decoded in utf8 with surrogateescape, generating a "�".
Then the object-server does not answer because "six.b" (https://six.readthedocs.io/#six.b) fails in eventlet/wsgi https://github.com/eventlet/eventlet/blob/6893078d04fa5d46b53269691202e0f709be905a/eventlet/wsgi.py#L498
and eventlet enforces latin1/iso-8859-1 when writing answers to wsgi https://github.com/eventlet/eventlet/blob/6893078d04fa5d46b53269691202e0f709be905a/eventlet/green/http/server.py#L333 https://github.com/eventlet/eventlet/blob/6893078d04fa5d46b53269691202e0f709be905a/eventlet/green/http/server.py#L564
---
For now, as a workaround, we are thinking to patch diskfile: https://opendev.org/openstack/swift/src/commit/9a1bfb8975fb1315fb417161a2865b6bb4760415/swift/obj/diskfile.py#L181-L185 and ssync_sender: https://opendev.org/openstack/swift/src/commit/9a1bfb8975fb1315fb417161a2865b6bb4760415/swift/obj/ssync_sender.py#L471-L473
What do you think?
After digging, we believe that the issue comes from https:/ /opendev. org/openstack/ swift/src/ commit/ 9a1bfb8975fb131 5fb417161a2865b 6bb4760415/ swift/obj/ diskfile. py#L181- L185 where the string encoded in latin1 with python2 is decoded in utf8 with surrogateescape, generating a "�".
Then the object-server does not answer because "six.b" (https:/ /six.readthedoc s.io/#six. b) fails in eventlet/wsgi https:/ /github. com/eventlet/ eventlet/ blob/6893078d04 fa5d46b53269691 202e0f709be905a /eventlet/ wsgi.py# L498
and eventlet enforces latin1/iso-8859-1 when writing answers to wsgi /github. com/eventlet/ eventlet/ blob/6893078d04 fa5d46b53269691 202e0f709be905a /eventlet/ green/http/ server. py#L333 /github. com/eventlet/ eventlet/ blob/6893078d04 fa5d46b53269691 202e0f709be905a /eventlet/ green/http/ server. py#L564
https:/
https:/
---
For now, as a workaround, we are thinking to patch diskfile: https:/ /opendev. org/openstack/ swift/src/ commit/ 9a1bfb8975fb131 5fb417161a2865b 6bb4760415/ swift/obj/ diskfile. py#L181- L185 /opendev. org/openstack/ swift/src/ commit/ 9a1bfb8975fb131 5fb417161a2865b 6bb4760415/ swift/obj/ ssync_sender. py#L471- L473
and ssync_sender: https:/
What do you think?