Plugin alt-info Spec
Overview
The plugin is mainly for testing the functions in the TSHttpAltInfo* group. It also tests the following APIs:
Plugin Specification
In TSPluginInit(), the pluign registers two handler functions on TS_HTTP_OS_DNS_HOOK and TS_HTTP_SELECT_ALT_HOOK respectively.
On TS_HTTP_OS_DNS_HOOK, the plugin calls the following functions:
On TS_HTTP_SELECT_ALT_HOOK, the plugins gets client request, cached request
and cached response from the alternate information. It then gets the Accept-Language
field value from the client request and the Content-language field value from
the cached response. If these two values are equivalent, the quality of this
alternate is set to 1, otherwise the quality is set to 0.