HELP with MMS Content-Type field | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through October 05, 2005 ⬆ |
◄ ► |
Author | Message | |||
R R New member Username: Rickwookie Post Number: 2 Registered: 12-2004 |
Hi I am having real difficulty in decoding the content type field in my 'm-retrieve-conf' PDU. Here's my Content-Type field (I hope!): 84 1B B3 89 61 80 80 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00 8A 3C 73 6D 69 6C 3E 00 and I found this in another thread: -------------------------------------------------------------------------------- quote: Content-type is one of the messiest headers. In this case, we have a very simple one. The null terminated string "application/vnd.wap.mms-message" is the content type header. Here are some general rules for parsing the content-type header field: -------------------------------------------------------------------------------- quote: If this byte is less than 0x00 thru 0x1E, then you have a single byte length. If this byte is 0x1F, then that is a length quote, and the length follows as a uintvar. If this byte is 0x20 thru 0x7F, then it is a null terminated text string. If this byte is 0x80 thru 0xFF, then it is a single byte binary encoding of the content type. When the content type field starts with a length, this is because there are parameters associated with the content type (e.g., charset=, name=, etc.) -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- So from all this I think I have: 84 = 0x04 Content-Type (from WAP-209-MMSEncapsulation - 7.3. Assigned Numbers - Table 8. Field Name Assignments) 1B = Is between 0x00 and 0x1E so is a single byte lenth of 27 (Hence I've included the following 27 bytes) B3 = Is >0x80 so it is a single byte binary encoding of the content type = 0xB3-0x80=0x33 = application/vnd.wap.multipart.related (from WSP Content Type Numbers at http://www.openmobilealliance.org/tech/omna/omna-wsp-content-type.htm) 89 = ? (maybe WKPA_TYPE???) 61 80 80 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00 = application/smil[NULL] 8A = ? (maybe WKPA_START???) 3C 73 6D 69 6C 3E 00 = <smil>[NULL] So my real question is, what are the parameters associated with the content type of 'application/vnd.wap.multipart.related' and hence are the last 26 bytes (particularly the 0x89 and the 0x8A). Any help/pointers would be much appreciated Thanks. | |||
R R New member Username: Rickwookie Post Number: 3 Registered: 12-2004 |
Okay I've found the parameter codes in table 38 of the WAP-230-WSP document I had all along! I wish that the document had refered to table 38 in the relevant section (8.4). It would have save me a lot of time! Trying to GOOGLE for the assigned parameter values finds nothing! Also these parameters are described in the specification for the Multipart/Related Content-type which can be found by GOOGLEing for 'RFC2387'. Hope this is useful for anyone else who is having the same problem. | |||
ake Unregistered guest |
84 - Binary code of Content-Type 1B - Value length of content-type B3 - 0x33 is content-type value application/vnd.wap.multipart.related 89 - 0x09 is parameter Type 61 80 80 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00 - application/smil 8A - 0x0A is parameter Start 3C 73 6D 69 6C 3E 00 - <smil> decode above binary as follows: Content-Type: application/vnd.wap.multipart.related; Type=application/smil;Start=<smil> ake, beijing |