XDAP header

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽

A DAP server should use the XDAP header to announce the lowest version of the needed to understand the current response. Each time a server builds/returns a response, it should try to set the protocol version in the XDAP to the lowest needed to read the response.

Higher versions of DAP should be compatible with the features in older versions of the protocol. For example, this means that a 3.3 client must be able to read a response that conforms to 2.0, 3.0, ..., 3.3.

DAP 3.1 Behavior

A server conforming to DAP 3.1 or greater MUST always return the XDAP: header and it MUST always contain the version number of the DAP such that a client implementing that version can understand the response. The server SHOULD return the lowest protocol version number needed to read the response, but MAY return a higher number if appropriate. For example, suppose a server is building a response that would require DAP 3.3 to read but encounters an error and instead will return an Error response. An Error response requires only DAP 2.0 so the server should return XDAP: 2.0 but it may instead return XDAP: 3.3.

A client that receives a response that is at or below the highest version it implements MUST process that response. A client SHOULD try to process responses with higher protocol numbers since servers might have labeled a response with a higher version than is really needed because determining the exact version for the data responses, for example, might be very complex.

A client MUST equate a server that sends no XDAP header as the same as a server which returns XDAP: 2.0.

DAP 3.2 Behavior

DAP 3.2 will introduce the notion of protocol negotiation, similar to HTTP's response type or encoding negotiation. The client may send an XDAP-Accept: header to tell the server the highest version of the protocol that the client can understand.