From 45ec781eaad34665520943b84116b6d820ec3fde Mon Sep 17 00:00:00 2001 From: Chia-hung Tai Date: Fri, 24 May 2013 10:20:47 +0800 Subject: [PATCH] Bug 873145 - B2G MMS: remove redundant X-MMS-Message-Size header field from outgoing requests. r=vyang --- dom/mms/src/ril/MmsService.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/dom/mms/src/ril/MmsService.js b/dom/mms/src/ril/MmsService.js index 8198e3e217f0..52e1edc97a99 100644 --- a/dom/mms/src/ril/MmsService.js +++ b/dom/mms/src/ril/MmsService.js @@ -718,19 +718,8 @@ function SendTransaction(msg) { if (DEBUG) debug("Check max values parameters fail."); throw new Error("Check max values parameters fail."); } - let messageSize = 0; - - if (msg.content) { - messageSize = msg.content.length; - } else if (msg.parts) { - for (let i = 0; i < msg.parts.length; i++) { - if (msg.parts[i].content.size) { - messageSize += msg.parts[i].content.size; - } else { - messageSize += msg.parts[i].content.length; - } - } + if (msg.parts) { let contentType = { params: { // `The type parameter must be specified and its value is the MIME @@ -757,10 +746,6 @@ function SendTransaction(msg) { msg.headers["content-type"] = contentType; } - // Assign to X-Mms-Message-Size - msg.headers["x-mms-message-size"] = messageSize; - // TODO: bug 809832 - support customizable max incoming/outgoing message size - if (DEBUG) debug("msg: " + JSON.stringify(msg)); this.msg = msg;