summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1d334fe)
MIME parameters correctly when building the Content-Disposition header.
static void set_id (CT, int);
static int compose_content (CT);
static int scan_content (CT, size_t);
static void set_id (CT, int);
static int compose_content (CT);
static int scan_content (CT, size_t);
-static int build_headers (CT);
+static int build_headers (CT, int);
static char *calculate_digest (CT, int);
static char *calculate_digest (CT, int);
/* Build the rest of the header field structures */
if (! dist)
/* Build the rest of the header field structures */
if (! dist)
+ build_headers (ct, header_encoding);
+build_headers (CT ct, int header_encoding)
{
int cc, mailbody, extbody, len;
char *np, *vp, buffer[BUFSIZ];
{
int cc, mailbody, extbody, len;
char *np, *vp, buffer[BUFSIZ];
if (ct->c_descr) {
np = add (DESCR_FIELD, NULL);
vp = concat (" ", ct->c_descr, NULL);
if (ct->c_descr) {
np = add (DESCR_FIELD, NULL);
vp = concat (" ", ct->c_descr, NULL);
+ if (encode_rfc2047(DESCR_FIELD, &vp, header_encoding, NULL))
+ adios(NULL, "Unable to encode %s header", DESCR_FIELD);
add_header (ct, np, vp);
}
add_header (ct, np, vp);
}
+ build_headers (p, header_encoding);
struct exbody *e;
e = (struct exbody *) ct->c_ctparams;
struct exbody *e;
e = (struct exbody *) ct->c_ctparams;
- build_headers (e->eb_content);
+ build_headers (e->eb_content, header_encoding);
if (strcasecmp(ct->c_ctinfo.ci_type, "text") == 0 &&
strcasecmp(ct->c_ctinfo.ci_subtype, "calendar") == 0) {
if (strcasecmp(ct->c_ctinfo.ci_type, "text") == 0 &&
strcasecmp(ct->c_ctinfo.ci_subtype, "calendar") == 0) {
- ct->c_dispo = getcpy("inline; filename=\"");
+ ct->c_dispo_type = getcpy("inline");
- ct->c_dispo = getcpy("attachment; filename=\"");
+ ct->c_dispo_type = getcpy("attachment");
- ct->c_dispo = add(simplename, ct->c_dispo);
- ct->c_dispo = add("\"\n", ct->c_dispo);
+ add_param(&ct->c_dispo_first, &ct->c_dispo_last, "filename", simplename);