# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Apache Traffic Server 6.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-01-02 21:32+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.1.1\n"

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:23
msgid "HTTP Alternate Selection"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:25
msgid ""
"The HTTP alternate selection functions provide a mechanism for hooking into "
"Traffic Server's alternate selection mechanism and augmenting it with "
"additional information. **HTTP alternate selection** refers to the process "
"of choosing between several alternate versions of a document for a specific "
"URL. Alternates arise because the HTTP 1.1 specification allows different "
"documents to be sent back for the same URL (depending on the clients "
"request). For example, a server might send back a GIF image to a client "
"that only accepts GIF images, and might send back a JPEG image to a client "
"that only accepts JPEG images."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:35
msgid ""
"The alternate selection mechanism is invoked when Traffic Server looks up a "
"URL in its cache. For each URL, Traffic Server stores a vector of "
"alternates. For each alternate in this vector, Traffic Server computes a "
"quality value between 0 and 1 that represents how \"good\" the alternate "
"is. A quality value of 0 means that the alternate is unacceptable; a value "
"of 1 means that the alternate is a perfect match."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:42
msgid ""
"If a plugin hooks onto the ``TS_HTTP_SELECT_ALT_HOOK``, then it will be "
"called back when Traffic Server performs alternate selection. You cannot "
"register locally to the hook ``TS_HTTP_SELECT_ALT_HOOK`` by using "
"``TSHttpTxnHookAdd`` - you can only do so by using only ``TSHttpHookAdd``. "
"Since Traffic Server does not actually have an HTTP transaction or an HTTP "
"session on hand when alternate selection is performed, it is only valid to "
"hook onto the global list of ``TS_HTTP_SELECT_ALT_HOOK``. Traffic Server "
"calls each of the select alternate hooks with the "
"``TS_EVENT_HTTP_SELECT_ALT`` event. The ``void *edata`` argument that is "
"passed to the continuation is a pointer to an ``TSHttpAltInfo`` structure. "
"It can be used later to call the HTTP alternate selection functions listed "
"at the end of this section. Unlike other hooks, this alternate selection "
"callout is non-blocking; the expectation is that the quality value for the "
"alternate will be changed by a call to ``TSHttpAltInfoQualitySet``."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:60
msgid ""
"HTTP SM does not have to be reenabled using ``TSHttpTxnReenable`` or any "
"other APIs; just return from the function."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:63
msgid "The sample code below shows how to call the alternate APIs."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:161
msgid ""
"Traffic Server augments the alternate selection through these callouts "
"using the following algorithm:"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:164
msgid ""
"Traffic Server computes its own quality value for the alternate, taking "
"into account the quality of the accept match, the encoding match, and the "
"language match."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:168
msgid ""
"Traffic Server then calls out each of the continuations on the global "
"``TS_HTTP_SELECT_ALT_HOOK``'s list."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:171
msgid ""
"It multiplies its quality value with the value returned by each callout. "
"Since all of the values are clamped to be between 0 and 1, the final value "
"will be between 0 and 1 as well."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:175
msgid ""
"This algorithm also ensures that a single callout can block the usage of a "
"given alternate by specifying a quality value of 0."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:178
msgid ""
"A common usage for the alternate selection mechanism is when a plugin "
"transforms a document for some clients and not for others, but wants to "
"store both the transformed and unchanged document. The client's request "
"will specify whether it accepted the transformed document. The plugin will "
"then determine if the alternate matches this specification and then set the "
"appropriate quality level for the alternate."
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:185
msgid "The HTTP alternate selection functions are:"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:187
msgid ""
"`TSHttpAltInfoCachedReqGet <http://people.apache.org/~amc/ats/doc/html/"
"ts_8h.html#af4f3a56716e3e97afd582c7fdb14bcb7>`_"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:189
msgid ""
"`TSHttpAltInfoCachedRespGet <http://people.apache.org/~amc/ats/doc/html/"
"ts_8h.html#aff5861ae4a4a7a6ce7b2d669c113b3bb>`_"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:191
msgid ""
"`TSHttpAltInfoClientReqGet <http://people.apache.org/~amc/ats/doc/html/"
"ts_8h.html#a74d494c6442b6012d8385e92f0e14dee>`_"
msgstr ""

#: ../../developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst:193
msgid ""
"`TSHttpAltInfoQualitySet <http://people.apache.org/~amc/ats/doc/html/ts_8h."
"html#a978b7160a048491d5698e0f4c0c79aad>`_"
msgstr ""
