WSP Content type format?

WSP Content type format? SearchSearch
Author Message
Suchit Agrawal
New member
Username: Suchit

Post Number: 1
Registered: 10-2007
Posted on Monday, October 01, 2007 - 12:48 pm:   

WSP Content type take content type and its parameters, described in WSP spec ----

Content-type-value = Constrained-media | Content-general-form
Content-general-form = Value-length Media-type
Media-type = (Well-known-media | Extension-Media) *(Parameter)

Content type also have rule that ----

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.


I want to know that ----

In the first and second case, length specify length of content types and its parameter, that have a combination of content-type, type and start. I seen in the mostly place that content type value always come in the format of WSP Content type assigned number and type and start value come in NULL terminating string.
Can content type come in NULL terminating string?

In the third case, length is not specified and content type and its parameters come in null terminating string.
Is Content type and its parameter, all would be separately Null terminated or NULL terminated at the end of parameter?