MMSbox: Improved sending of data to service - try to send all parts to look like files
This commit is contained in:
parent
d48ac96cd7
commit
b2f178153c
|
@ -204,20 +204,22 @@ done:
|
||||||
List *ph = get_value_parameters(q);
|
List *ph = get_value_parameters(q);
|
||||||
Octstr *v = http_header_value(ph, octstr_imm("name"));
|
Octstr *v = http_header_value(ph, octstr_imm("name"));
|
||||||
|
|
||||||
if (v) {
|
if (!v) /* make up a fake name. */
|
||||||
octstr_format_append(cd, "; filename=\"%S\"", v);
|
v = octstr_format("%S-file", pm->name);
|
||||||
http_header_remove_all(ph, "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(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);
|
http_destroy_headers(ph);
|
||||||
octstr_destroy(q);
|
octstr_destroy(q);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue