[Vortex] PATCH: set transfer encoding correctly in __vortex_channel_get_mime_headers
Jens Alfke
jens at mooseyard.com
Fri May 9 21:17:39 CEST 2008
There's a typo in __vortex_channel_get_mime_headers that causes it to
send a non-default content-transfer-encoding incorrectly. It instead
sends a truncated version of the content-type. Looks like this was a
copy-and-paste error where the string 'mime_type' was not replaced
with 'transfer_encoding'.
My vortex_channel.c still has local modifications, so I won't send a
real patch, but the changes are pretty simple and I'll just include
the block before and after the fix. This is at line 506 in my sources.
—Jens
BEFORE:
/* check for the Content-Transfer-Encoding header configuration */
if (transfer_encoding != NULL && !axl_cmp (transfer_encoding,
"binary")) {
/* add mime Content-Type: entity header */
memcpy (buffer + size, "Content-Transfer-Encoding: ", 27);
/* add mime type value */
memcpy (buffer + size + 27, mime_type, strlen (mime_type));
/* add trailing \x0D\x0A value */
memcpy (buffer + size + 27 + strlen (mime_type), "\x0D\x0A", 2);
size += 29 + strlen (transfer_encoding);
headers_found = true;
}
AFTER:
/* check for the Content-Transfer-Encoding header configuration */
if (transfer_encoding != NULL && !axl_cmp (transfer_encoding,
"binary")) {
/* add mime Content-Transfer-Encoding: entity header */
memcpy (buffer + size, "Content-Transfer-Encoding: ", 27);
/* add mime type value */
memcpy (buffer + size + 27, transfer_encoding, strlen
(transfer_encoding));
/* add trailing \x0D\x0A value */
memcpy (buffer + size + 27 + strlen (transfer_encoding), "\x0D\x0A",
2);
size += 29 + strlen (transfer_encoding);
headers_found = true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20080509/bb12a040/attachment.bin
More information about the Vortex
mailing list