HELP with MMS Content-Type field

HELP with MMS Content-Type field SearchSearch
Author Message
R R
New member
Username: Rickwookie

Post Number: 1
Registered: 12-2004
Posted on Thursday, June 23, 2005 - 03:12 pm:   

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 = ?

61 80 80 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00 = application/smil[NULL]

8A = ?

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.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4676
Registered: 10-2002
Posted on Wednesday, July 27, 2005 - 09:43 pm:   

Please refer to the WAP WSP specification, where the Content-type header encoding is defined.

The content-type header can have parameters ... and the bytes that you are asking about are "well-known-parameter-tokens", which are defined in table 38 of that spec.

You're looking at:

Content-type: application/vnd.wap.multipart.related; type="application/smil"; start=<smil>

-bn