dvoina / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

MSRP Content-Type cannot be changed? #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.The value of Content-Type in MSRP message is always 
"application/octet-stream".
2.How to set the value of Content-Type in MSRP message?

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
IMSDroid 1.1.343   on Android 2.2

Please provide any additional information below.

ActionConfig messageConfig = new ActionConfig();
messageConfig.setMediaString(twrap_media_type_t.twrap_media_msrp, 
"Content-Type", "text/plain;charset=utf-8");
msrpSession.session.sendMessage(payload, (long)payload.capacity(), 
messageConfig);

setMediaString seem to do not work?

The value of Content-Type is still "application/octet-stream".

Original issue reported on code.google.com by nieyaol...@gmail.com on 10 Jan 2011 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 10 Jan 2011 at 5:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixed in 1.2.355.
You can now add any "content-type" to any MSRP message. You should let the 
stack negotiate the right "content-type" by advertising all supported 
content-types in the "accept-types" header before sending the 200OK or the 
initial invite.

For example to add "text/plain" as content-type:
messageConfig.setMediaString(twrap_media_type_t.twrap_media_msrp, 
"content-type", "text/plain;charset=utf-8");

For example to add "text/plain" as wrapped (into CPIM) content-type:
messageConfig
.setMediaString(twrap_media_type_t.twrap_media_msrp, "content-Type", 
"message/CPIM")
.setMediaString(twrap_media_type_t.twrap_media_msrp, "w-content-type", 
"text/plain;charset=utf-8");

Original comment by boss...@yahoo.fr on 11 Jan 2011 at 1:15

GoogleCodeExporter commented 9 years ago
Hi, Dear boss...@yahoo.fr
What is the value of accept-types should be setted.
help me,please.

Original comment by sundl2...@gmail.com on 22 Feb 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Hi,everybode
I also can't the value of content-type,it's always "application/octet-stream"
help me,it's important for me.

Original comment by yangziji...@gmail.com on 22 Feb 2011 at 8:30

Attachments:

GoogleCodeExporter commented 9 years ago
which version of IMSDroid and Doubango are you using?
Could you please send the code you are using to send the message?

Original comment by boss...@yahoo.fr on 22 Feb 2011 at 9:28

GoogleCodeExporter commented 9 years ago
version:1.1.341

Original comment by yangziji...@gmail.com on 22 Feb 2011 at 9:50

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by yangziji...@gmail.com on 22 Feb 2011 at 9:55

Attachments: