Envelope and header values consistently decoded from utf-8. See RFC 8616.

This commit is contained in:
Stuart D. Gathman
2020-04-21 18:20:16 -04:00
parent 2b1b01c1ef
commit 3844751ef0
9 changed files with 68 additions and 27 deletions
+1
View File
@@ -675,6 +675,7 @@ milter_wrap_header(SMFICTX *ctx, char *headerf, char *headerv) {
c = _get_context(ctx);
if (!c) return SMFIS_TEMPFAIL;
#if PY_MAJOR_VERSION >= 3
/* pass val as bytes so Milter.Base.header_bytes can do surrogate escape. */
arglist = Py_BuildValue("(Osy)", c, headerf, headerv);
#else
arglist = Py_BuildValue("(Oss)", c, headerf, headerv);