1
0
Fork 0

MMSbox: Improved sending of data to service - try to send all parts to look like files

This commit is contained in:
bagyenda 2006-05-29 14:00:36 +00:00
parent d48ac96cd7
commit b2f178153c
1 changed files with 15 additions and 13 deletions

View File

@ -204,20 +204,22 @@ done:
List *ph = get_value_parameters(q);
Octstr *v = http_header_value(ph, octstr_imm("name"));
if (v) {
octstr_format_append(cd, "; filename=\"%S\"", v);
http_header_remove_all(ph, "name");
if (!v) /* make up a fake name. */
v = octstr_format("%S-file", pm->name);
octstr_format_append(cd, "; filename=\"%S\"", v);
http_header_remove_all(ph, "name");
octstr_destroy(v);
octstr_destroy(ctype);
v = make_value_parameters(ph);
if (v && octstr_len(v) > 0)
ctype = octstr_format("%S; %S", c, v);
else
ctype = octstr_duplicate(c);
if (v)
octstr_destroy(v);
octstr_destroy(ctype);
v = make_value_parameters(ph);
if (v && octstr_len(v) > 0)
ctype = octstr_format("%S; %S", c, v);
else
ctype = octstr_duplicate(c);
if (v)
octstr_destroy(v);
}
http_destroy_headers(ph);
octstr_destroy(q);
}