Dela via


2.2.1.1.1.1 Base64-Encoded Query Value

The base64-encoded query value uses base64 encoding to specify the URI parameters and request headers. The URI parameters and request headers are contained within the fields of a byte sequence. Once the byte sequence is created, it is converted to base64 as specified in [RFC2045]. The base64-encoded query value is then appended to the request URI.

The following is an example of a URI that contains a base64-encoded query value.

 /Microsoft-Server-ActiveSync?jAAJBAp2MTQwRGV2aWNlAApTbWFydFBob25l

NOTE: The base64-encoded query value is supported only by protocol versions 12.1, 14.0, 14.1, 16.0, and 16.1. If the client uses protocol version 2.5 or 12.0, the plain text query value, as specified in section 2.2.1.1.1.2, MUST be used in the request URI.

The fields of the byte sequence are as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Protocol version

Command code

Locale

Device ID length

Device ID (variable)

...

Policy key length

Policy key (optional)

...

Device type length

Device type (variable)

...

Command parameters (variable)

...

Protocol version (1 byte): An integer that specifies the version of the ActiveSync protocol that is being used. This value SHOULD<1> be 141, 160 or 161. This value MAY<2> be 140 or 121.

Command code (1 byte): An integer that specifies the command (see table of command codes in section 2.2.1.1.1.1.2).

Locale (2 bytes): An integer that specifies the locale of the language that is used for the response. Locale integer values are specified in [MS-LCID].

Device ID length (1 byte): An integer that specifies the length of the Device ID field. This value MUST be greater than 0.

Device ID (variable): A string or a GUID that identifies the device. For details, see section 2.2.1.1.1.2.3. The length of this field is specified by the Device ID length field.

Policy key length (1 byte): An integer that specifies the length of the policy key. The only valid values are 0 or 4. A value of 0 indicates that the policy key field is absent.

Policy key (4 bytes, optional): An unsigned integer that indicates the state of policy settings on the client device, as specified in [MS-ASPROV] section 2.2.2.42. If the value of the Policy key length field is 0, this field is absent.

Device type length (1 byte): An integer that specifies the length of the Device type field.

Device type (variable): A string that specifies the type of client device. For details, see section 2.2.1.1.1.2.4. The length of this field is specified by the Device type length field.

Command parameters (variable): An array of Encoded Parameter structures as specified in section 2.2.1.1.1.1.1. This field is only present if there are command-specific parameters associated with the command specified by the Command code field. See section 2.2.1.1.1.1.3 for a list of command-specific parameters.