MMS m-send-req decoding

MMS m-send-req decoding SearchSearch
Author Message
Oded Arbel
New member
Username: Guss77

Post Number: 3
Registered: 07-2004
Posted on Sunday, July 04, 2004 - 05:55 pm:   

Hi guys. I need some help in decoding an MMS m-send-req message. I don't understand how to know what is the length of the MMS headers in the wap-multipart data chunk that is delivered as the body of the HTTP request - I parse the headers ok, but I don't know where to stop - according to WSP the headers should start with a variable uint that tells the length of the headers, but I can't see it!

Here is the example I'm trying to parse:
8C 80 98 45 30 42 42 43 38 35 35 38 35 39 41 32
46 00 8D 90 89 01 81 97 30 35 34 37 33 34 30 30
31 30 2F 54 59 50 45 3D 50 4C 4D 4E 00 8A 80 88
05 81 03 09 3A 80 8F 81 86 80 90 81 84 1F 21 B3
8A 3C 32 30 38 39 32 36 35 30 39 35 3E 00 89 61
70 70 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00
02 1E 0E 10 83 81 EA 85 54 68 69 73 5F 69 73 2E
74 78 74 00 8E 54 68 69 73 5F 69 73 2E 74 78 74
00 54 68 69 73 20 69 73 20 61 20 74 65 73 74 2E
82 04 1E 61 70 70 6C 69 63 61 74 69 6F 6E 2F 73
6D 69 6C 00 81 EA 85 70 72 65 73 2E 73 6D 69 6C
00 C0 22 3C 32 30 38 39 32 36 35 30 39 35 3E 00
0D 0A 3C 73 6D 69 6C 3E 0D 0A 3C 68 65 61 64 3E
0D 0A 3C 6C 61 79 6F 75 74 3E 0D 0A 3C 72 6F 6F
74 2D 6C 61 79 6F 75 74 20 77 69 64 74 68 3D 22
31 37 36 22 20 68 65 69 67 68 74 3D 22 32 30 38
22 2F 3E 0D 0A 3C 72 65 67 69 6F 6E 20 69 64 3D
22 54 65 78 74 22 20 77 69 64 74 68 3D 22 31 36
30 22 20 68 65 69 67 68 74 3D 22 31 39 38 22 20
74 6F 70 3D 22 35 22 20 6C 65 66 74 3D 22 38 22
20 66 69 74 3D 22 73 63 72 6F 6C 6C 22 2F 3E 0D
0A 3C 2F 6C 61 79 6F 75 74 3E 0D 0A 3C 2F 68 65
61 64 3E 0D 0A 3C 62 6F 64 79 3E 0D 0A 3C 70 61
72 20 64 75 72 3D 22 35 30 30 30 6D 73 22 3E 0D
0A 3C 74 65 78 74 20 72 65 67 69 6F 6E 3D 22 54
65 78 74 22 20 73 72 63 3D 22 54 68 69 73 5F 69
73 2E 74 78 74 22 2F 3E 0D 0A 3C 2F 70 61 72 3E
0D 0A 3C 2F 62 6F 64 79 3E 0D 0A 3C 2F 73 6D 69
6C 3E 0D 0A


now as I see, the content-type:
B3 8A 3C 32 30 38 39 32 36 35 30 39 35 3E 00 89 61 70 70 6C 69 63 61 74 69 6F 6E 2F 73 6D 69 6C 00 = Content-Type: application/vnd.wap.multipart.related; start: <2089265095>; type: application/smil
is the last element of the headers in the WSP header section of the MMS - isn't it supposed to be always first ?
And I don't understand how am I supposed to know that the mutlipart content starts immidietly after - should I assume that the content-type is always the last field ?

TIA