mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 873145 - B2G MMS: remove redundant X-MMS-Message-Size header field from outgoing requests. r=vyang
This commit is contained in:
parent
bb7b02a24c
commit
03fe2e7991
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user