mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 883017 - Send MMS with UTF-8 charset; r=gene.lian
Some MMSC seems to be doing bad things if we don't encode/specify the correct encoding: SFR and Bouygues Telecom delivers UTF-8 destroyed, while Free Mobile and Orange did a good job. Setting the charset to UTF-8 makes those four carriers (and probably a lot more) happy.
This commit is contained in:
parent
4e30f42dab
commit
956a70d8c4
@ -1392,7 +1392,10 @@ MmsService.prototype = {
|
||||
"content-type": {
|
||||
"media": "application/smil",
|
||||
"params": {
|
||||
"name": "smil.xml"
|
||||
"name": "smil.xml",
|
||||
"charset": {
|
||||
"charset": "utf-8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content-length": smil.length,
|
||||
@ -1409,13 +1412,22 @@ MmsService.prototype = {
|
||||
let attachment = attachments[i];
|
||||
let content = attachment.content;
|
||||
let location = attachment.location;
|
||||
|
||||
let params = {
|
||||
"name": location
|
||||
};
|
||||
|
||||
if (content.type && content.type.indexOf("text/") == 0) {
|
||||
params.charset = {
|
||||
"charset": "utf-8"
|
||||
};
|
||||
}
|
||||
|
||||
let part = {
|
||||
"headers": {
|
||||
"content-type": {
|
||||
"media": content.type,
|
||||
"params": {
|
||||
"name": location
|
||||
}
|
||||
"params": params
|
||||
},
|
||||
"content-length": content.size,
|
||||
"content-location": location,
|
||||
|
Loading…
Reference in New Issue
Block a user