diff options
| author | Olivier Dony <odo@openerp.com> | 2010-12-10 00:07:42 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2010-12-10 00:07:42 +0100 |
| commit | bb82904ba3b4f63f6c099c4a0c7b6b1814c61a33 (patch) | |
| tree | 59559c932339a5147bbdb576901355b70b1f9e46 /addons/project_long_term/project_long_term.py | |
| parent | eb25611f004e8cd33e9beb9766bc475aaf7de4ba (diff) | |
[FIX] fields.function: make sure all binary values can always be serialized as valid XML
Nnormally, binary fields should be 7-bit ASCII base64-encoded data, but sometimes
it's not the case, so we do additional sanity checks to make sure the binary values
can pass safely via xmlrpc as strings.
As a last resort we coerce the binary values to unicode to make sure they can
be safely serialized as utf-8-encoded values, always valid XML characters.
When this happens, decoding on the other endpoint is not likely to produce
the expected output, but this isjust a safety mechanism(in these cases base64
data or xmlrpc. Binary values should be returned instead by the function field.
In a future version we should probably switch to using XMLRPC Binary types always for
passing fields.binary values, but this requires more refactoring.
lp bug: https://launchpad.net/bugs/670778 fixed
bzr revid: odo@openerp.com-20101209230742-gwf8e4zvmk43k6ln
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
0 files changed, 0 insertions, 0 deletions
