1
0
Fork 0

order of xml fields

This commit is contained in:
bagyenda 2008-09-15 10:37:44 +00:00
parent 3e3b9b2b2b
commit c0e677a7a5
2 changed files with 22 additions and 14 deletions

View File

@ -1,3 +1,7 @@
2008-09-15 P. A. Bagyenda <bagyenda@dsmagic.com>
* Order of XML tags in MM7 packet changed (shouldn't matter, but...)
2008-09-12 P. A. Bagyenda <bagyenda@dsmagic.com>
* Improved reporting of DLR Message-ID even with relay
2008-09-12 P. A. Bagyenda <bagyenda@dsmagic.com>
* Added facility for appending special response header to each message (mime) part in MM7 response
* Added mmsbox cdr logging

View File

@ -1063,19 +1063,6 @@ MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto,
octstr_destroy(s);
}
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Delivery-Report"))) != NULL) {
char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ?
"true" : "false";
http_header_add(m->envelope, "DeliveryReport", val);
octstr_destroy(s);
}
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Read-Report"))) != NULL) {
char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ?
"true" : "false";
http_header_add(m->envelope, "ReadReply", val);
octstr_destroy(s);
}
/* Track adaptations stuff -- Vincent */
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Allow-Adaptations"))) != NULL) {
char *val = (octstr_case_compare(s, octstr_imm("true")) == 0) ?
@ -1097,11 +1084,28 @@ MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto,
octstr_destroy(s);
}
if (isclientside) {
if (isclientside) { /* We need this twice because of stupid parsers out there that
* care about the order of XML fields.
*/
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Expiry"))) != NULL) {
http_header_add(m->envelope, "ExpiryDate", octstr_get_cstr(s));
octstr_destroy(s);
}
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Delivery-Report"))) != NULL) {
char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ?
"true" : "false";
http_header_add(m->envelope, "DeliveryReport", val);
octstr_destroy(s);
}
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Read-Report"))) != NULL) {
char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ?
"true" : "false";
http_header_add(m->envelope, "ReadReply", val);
octstr_destroy(s);
}
}
if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Priority"))) != NULL) {