You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2013/07/29 19:50:13 UTC

[2/2] git commit: Documentation updates - fixing errors, warnings, spaces. No warnings!

Documentation updates - fixing errors, warnings, spaces. No warnings!


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8226827f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8226827f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8226827f

Branch: refs/heads/master
Commit: 8226827fe6bd22aa03776116aeb023e2dbfe7863
Parents: d55a2ec
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Mon Jul 29 12:49:37 2013 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Mon Jul 29 12:49:37 2013 -0500

----------------------------------------------------------------------
 .../basic-authorization-plugin.en.rst           |   7 +-
 .../blacklist-plugin.en.rst                     |   9 +-
 .../release-marshal-buffer-handles.en.rst       |  70 ++--
 doc/sdk/http-headers/marshal-buffers.en.rst     |  57 ++-
 doc/sdk/http-hooks-and-transactions.en.rst      |  30 +-
 .../http-alternate-selection.en.rst             | 235 ++++++------
 doc/sdk/http-transformation-plugin.en.rst       |  58 +--
 ...e-buffered-null-transformation-plugin.en.rst | 355 +++++++++----------
 .../sample-null-transformation-plugin.en.rst    |  23 +-
 ...trafficserver-settings-and-statistics.en.rst |  42 +--
 10 files changed, 433 insertions(+), 453 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
index 6b1e10e..8caea52 100644
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
+++ b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
@@ -34,10 +34,11 @@ Creating the Plugin's Parent Continuation and Global Hook
 The parent continuation and global hook are created as follows:
 
 ``TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, TSContCreate (auth_plugin, NULL));``
+
 .. toctree::
    :maxdepth: 2
 
-   implementing-the-handler-and-getting-a-handle-to-the-transaction.en
-   working-with-http-headers.en
-   setting-a-transaction-hook.en
+   basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en
+   basic-authorization-plugin/working-with-http-headers.en
+   basic-authorization-plugin/setting-a-transaction-hook.en
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
index 738a189..5122308 100644
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
+++ b/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
@@ -97,11 +97,12 @@ established in ``TSPluginInit``, ``TS_EVENT_HTTP_SEND_RESPONSE_HDR`` is
 sent because the plugin contains a transaction hook (see `Setting Up a
 Transaction Hook <setting-a-transaction-hook.html>`__). It is good
 practice to have a default case in your switch statements.
+
 .. toctree::
    :maxdepth: 2
 
-   setting-a-global-hook.en
-   accessing-the-transaction-being-processed.en
-   setting-up-a-transaction-hook.en
-   working-with-http-header-functions.en
+   blacklist-plugin/setting-a-global-hook.en
+   blacklist-plugin/accessing-the-transaction-being-processed.en
+   blacklist-plugin/setting-up-a-transaction-hook.en
+   blacklist-plugin/working-with-http-header-functions.en
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst b/doc/sdk/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst
index cf04d47..26089e8 100644
--- a/doc/sdk/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst
+++ b/doc/sdk/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst
@@ -3,20 +3,20 @@ Release Marshal Buffer Handles
 
 .. 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.
+   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.
 
 When you fetch a component object or create a new object, you get back a
 handle to the object location. The handle is either an ``TSMLoc`` for an
@@ -34,52 +34,46 @@ of the object to be released. The parent location is usually clear from
 the creation of the ``TSMLoc`` or string. For example, if your plugin
 had the following calls:
 
-::
+.. code-block:: c
 
-        ::::c
-    url_loc = TSHttpHdrUrlGet (bufp, hdr_loc);
-    host_string = TSUrlHostGet (bufp, url_loc, &host_length);
+   url_loc = TSHttpHdrUrlGet (bufp, hdr_loc);
+   host_string = TSUrlHostGet (bufp, url_loc, &host_length);
 
 then your plugin would have to call:
 
-::
+.. code-block:: c
 
-        ::::c
-    TSHandleMLocRelease (bufp, hdr_loc, url_loc);
+   TSHandleMLocRelease (bufp, hdr_loc, url_loc);
 
 If an ``TSMLoc`` is obtained from a transaction, then it does not have a
 parent ``TSMLoc``. Use the null ``TSMLoc`` constant ``TS_NULL_MLOC`` as
 its parent. For example, if your plugin calls:
 
-::
+.. code-block:: c
 
-        ::::c
-    TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc);
+   TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc);
 
 then you must release ``hdr_loc`` with:
 
-::
+.. code-block:: c
 
-        ::::c
-        TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
+   TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
 
 You need to use ``TS_NULL_MLOC`` to release any ``TSMLoc`` handles
 retrieved by the ``TSHttpTxn*Get`` functions.
 
 Here's an example using a new ``TSMimeHdrField`` function:
 
-::
+.. code-block:: c
 
-        ::::c
-    TSHttpTxnServerRespGet( txnp, &resp_bufp, &resp_hdr_loc );
-    new_field_loc = TSMimeHdrFieldCreate (resp_bufp, resp_hdr_loc);
-    TSHandleMLocRelease ( resp_bufp, resp_hdr_loc, new_field_loc);
-    TSHandleMLocRelease ( resp_bufp, TS_NULL_MLOC, resp_hdr_loc);
+   TSHttpTxnServerRespGet( txnp, &resp_bufp, &resp_hdr_loc );
+   new_field_loc = TSMimeHdrFieldCreate (resp_bufp, resp_hdr_loc);
+   TSHandleMLocRelease ( resp_bufp, resp_hdr_loc, new_field_loc);
+   TSHandleMLocRelease ( resp_bufp, TS_NULL_MLOC, resp_hdr_loc);
 
 See the sample plugins for many more examples.
 
-.. figure:: /images/docbook/tip.png
-   :alt:
-   
-.. rubric:: Tip - You should release handles before reenabling the HTTP transaction. In
-other words, call ``TSHandleMLocRelease`` before ``TSHttpTxnReenable``.
+.. tip::
+
+   You should release handles before reenabling the HTTP transaction.
+   In other words, call ``TSHandleMLocRelease`` before ``TSHttpTxnReenable``.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-headers/marshal-buffers.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-headers/marshal-buffers.en.rst b/doc/sdk/http-headers/marshal-buffers.en.rst
index 9271a9b..28088b7 100644
--- a/doc/sdk/http-headers/marshal-buffers.en.rst
+++ b/doc/sdk/http-headers/marshal-buffers.en.rst
@@ -3,20 +3,20 @@ Marshal Buffers
 
 .. 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.
+   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.
 
 A **marshal buffer**, or ``TSMBuffer``, is a heap data structure that
 stores parsed URLs, MIME headers, and HTTP headers. You can allocate new
@@ -36,21 +36,16 @@ The **marshal buffer functions** enable you to create and destroy
 Traffic Server's marshal buffers, which are the data structures that
 hold parsed URLs, MIME headers, and HTTP headers.
 
-.. figure:: /images/docbook/caution.png
-   :alt: [Caution]
-
-   [Caution]
-**Caution**
-
-Any marshal buffer fetched by ``TSHttpTxn*Get`` will be used by other
-parts of the system. Be careful not to destroy these shared transaction
-marshal buffers in functions such as those below:
-
--  ```TSHttpTxnCachedReqGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a889b626142157077f4f3cfe479e8b8e2>`__
--  ```TSHttpTxnCachedRespGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#ae8f24b8dabb5008ad11620a11682ffd6>`__
--  ```TSHttpTxnClientReqGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#acca66f22d0f87bf8f08478ed926006a5>`__
--  ```TSHttpTxnClientRespGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a92349c8363f72b1f6dfed3ae80901fff>`__
--  ```TSHttpTxnServerReqGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#aac2343a8b47bf9150f3ff7cd4e692d57>`__
--  ```TSHttpTxnServerRespGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a39e8bfb199eadabb54c067ff25a9a400>`__
--  ```TSHttpTxnTransformRespGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a20367f5469e8b7e73621c1316091d578>`__
+.. caution::
+   Any marshal buffer fetched by ``TSHttpTxn*Get`` will be used by other
+   parts of the system. Be careful not to destroy these shared transaction
+   marshal buffers in functions such as those below:
+
+-  `TSHttpTxnCachedReqGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a889b626142157077f4f3cfe479e8b8e2>`_
+-  `TSHttpTxnCachedRespGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#ae8f24b8dabb5008ad11620a11682ffd6>`_
+-  `TSHttpTxnClientReqGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#acca66f22d0f87bf8f08478ed926006a5>`_
+-  `TSHttpTxnClientRespGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a92349c8363f72b1f6dfed3ae80901fff>`_
+-  `TSHttpTxnServerReqGet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#aac2343a8b47bf9150f3ff7cd4e692d57>`_
+-  `TSHttpTxnServerRespGet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a39e8bfb199eadabb54c067ff25a9a400>`_
+-  `TSHttpTxnTransformRespGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a20367f5469e8b7e73621c1316091d578>`_
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-hooks-and-transactions.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-hooks-and-transactions.en.rst b/doc/sdk/http-hooks-and-transactions.en.rst
index 037ec0a..98191cb 100644
--- a/doc/sdk/http-hooks-and-transactions.en.rst
+++ b/doc/sdk/http-hooks-and-transactions.en.rst
@@ -3,20 +3,20 @@ HTTP Hooks and Transactions
 
 .. 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.
+   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.
 
 Hooks are points in Traffic Server transaction processing where plugins
 can step in and do some work. Registering a plugin function for callback
@@ -75,7 +75,7 @@ when the connection closes.
 **HTTP Transaction State Diagram (*not yet updated*)**
 {#HHTTPTxStateDiag}
 
-.. figure:: /images/sdk/http_state2.jpg
+.. figure:: /static/images/sdk/http_state2.jpg
    :alt: HTTP Transaction State Diagram
 
    HTTP Transaction State Diagram

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-hooks-and-transactions/http-alternate-selection.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-hooks-and-transactions/http-alternate-selection.en.rst b/doc/sdk/http-hooks-and-transactions/http-alternate-selection.en.rst
index 70f0214..3a2b3b5 100644
--- a/doc/sdk/http-hooks-and-transactions/http-alternate-selection.en.rst
+++ b/doc/sdk/http-hooks-and-transactions/http-alternate-selection.en.rst
@@ -3,20 +3,20 @@ HTTP Alternate Selection
 
 .. 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.
+   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.
 
 The HTTP alternate selection functions provide a mechanism for hooking
 into Traffic Server's alternate selection mechanism and augmenting it
@@ -51,109 +51,108 @@ 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``.
 
-|[Note]| **Note**
+.. note::
 
-HTTP SM does not have to be reenabled using ``TSHttpTxnReenable`` or any
-other APIs; just return from the function.
+   HTTP SM does not have to be reenabled using ``TSHttpTxnReenable`` or any
+   other APIs; just return from the function.
 
 The sample code below shows how to call the alternate APIs.
 
-::
-
-    :::c
-    static void handle_select_alt(TSHttpAltInfo infop)
-    {
-        TSMBuffer client_req_buf, cache_resp_buf;
-        TSMLoc client_req_hdr, cache_resp_hdr;
-        
-        TSMLoc accept_transform_field;
-        TSMLoc content_transform_field;
-        
-        int accept_transform_len = -1, content_transform_len = -1;
-        const char* accept_transform_value = NULL;
-        const char* content_transform_value = NULL;
-        int content_plugin, accept_plugin;
-        
-        float quality;
-        
-        /* get client request, cached request and cached response */
-        TSHttpAltInfoClientReqGet (infop, &client_req_buf, &client_req_hdr);
-        TSHttpAltInfoCachedRespGet(infop, &cache_resp_buf, &cache_resp_hdr);
-        
-        /* get the Accept-Transform field value from the client request */
-        accept_transform_field = TSMimeHdrFieldFind(client_req_buf,
-                client_req_hdr, "Accept-Transform", -1);
-        if (accept_transform_field) {
-            TSMimeHdrFieldValueStringGet(client_req_buf, client_req_hdr,
-                    accept_transform_field, 0, &accept_transform_value, &accept_transform_len);
-            TSDebug(DBG_TAG, "Accept-Transform = |%s|",
-                    accept_transform_value);
-        }
-        
-        /* get the Content-Transform field value from cached server response */
-        content_transform_field = TSMimeHdrFieldFind(cache_resp_buf,
-                cache_resp_hdr, "Content-Transform", -1);
-        if (content_transform_field) {
-            TSMimeHdrFieldValueStringGet(cache_resp_buf, cache_resp_hdr,
-                    content_transform_field, 0, &content_transform_value, &content_transform_len);
-            TSDebug(DBG_TAG, "Content-Transform = |%s|",
-                    content_transform_value);
-        }
-        
-        /* compute quality */
-        accept_plugin = (accept_transform_value && (accept_transform_len > 0) &&
-                (strncmp(accept_transform_value, "plugin",
-                     accept_transform_len) == 0));
-        
-        content_plugin = (content_transform_value && (content_transform_len >0) &&
-                (strncmp(content_transform_value, "plugin",
-                     content_transform_len) == 0));
-        
-        if (accept_plugin) {
-            quality = content_plugin ? 1.0 : 0.0;
-        } else {
-            quality = content_plugin ? 0.0 : 0.5;
-        }
-        
-        TSDebug(DBG_TAG, "Setting quality to %3.1f", quality);
-        
-        /* set quality for this alternate */
-        TSHttpAltInfoQualitySet(infop, quality);
-        
-        /* cleanup */
-        if (accept_transform_field)
-            TSHandleMLocRelease(client_req_buf, client_req_hdr,
-                    accept_transform_field);
-        TSHandleMLocRelease(client_req_buf, TS_NULL_MLOC, client_req_hdr);
-        
-        if (content_transform_field)
-            TSHandleMLocRelease(cache_resp_buf, cache_resp_hdr,
-                    content_transform_field);
-        TSHandleMLocRelease(cache_resp_buf, TS_NULL_MLOC, cache_resp_hdr);
-    }
-        
-    static int alt_plugin(TSCont contp, TSEvent event, void *edata)
-    {
-        TSHttpAltInfo infop;
-        
-        switch (event) {
-            case TS_EVENT_HTTP_SELECT_ALT:
-                infop = (TSHttpAltInfo)edata;
-                handle_select_alt(infop);
-                break;
-                
-            default:
-                break;
-        }
-        
-        return 0;
-    }
-        
-    void TSPluginInit (int argc, const char *argv[])
-    {
-        TSHttpHookAdd(TS_HTTP_SELECT_ALT_HOOK, TSContCreate (alt_plugin,
-                    NULL));
-    }
+.. code-block:: c
+
+   static void handle_select_alt(TSHttpAltInfo infop)
+   {
+      TSMBuffer client_req_buf, cache_resp_buf;
+      TSMLoc client_req_hdr, cache_resp_hdr;
+      
+      TSMLoc accept_transform_field;
+      TSMLoc content_transform_field;
+      
+      int accept_transform_len = -1, content_transform_len = -1;
+      const char* accept_transform_value = NULL;
+      const char* content_transform_value = NULL;
+      int content_plugin, accept_plugin;
+      
+      float quality;
+      
+      /* get client request, cached request and cached response */
+      TSHttpAltInfoClientReqGet (infop, &client_req_buf, &client_req_hdr);
+      TSHttpAltInfoCachedRespGet(infop, &cache_resp_buf, &cache_resp_hdr);
+      
+      /* get the Accept-Transform field value from the client request */
+      accept_transform_field = TSMimeHdrFieldFind(client_req_buf,
+         client_req_hdr, "Accept-Transform", -1);
+      if (accept_transform_field) {
+         TSMimeHdrFieldValueStringGet(client_req_buf, client_req_hdr,
+            accept_transform_field, 0, &accept_transform_value, &accept_transform_len);
+         TSDebug(DBG_TAG, "Accept-Transform = |%s|",
+            accept_transform_value);
+      }
+       
+      /* get the Content-Transform field value from cached server response */
+      content_transform_field = TSMimeHdrFieldFind(cache_resp_buf,
+         cache_resp_hdr, "Content-Transform", -1);
+      if (content_transform_field) {
+         TSMimeHdrFieldValueStringGet(cache_resp_buf, cache_resp_hdr,
+            content_transform_field, 0, &content_transform_value, &content_transform_len);
+         TSDebug(DBG_TAG, "Content-Transform = |%s|",
+            content_transform_value);
+      }
+       
+      /* compute quality */
+      accept_plugin = (accept_transform_value && (accept_transform_len > 0) &&
+         (strncmp(accept_transform_value, "plugin",
+            accept_transform_len) == 0));
+      
+      content_plugin = (content_transform_value && (content_transform_len >0) &&
+         (strncmp(content_transform_value, "plugin",
+            content_transform_len) == 0));
+      
+      if (accept_plugin) {
+         quality = content_plugin ? 1.0 : 0.0;
+      } else {
+         quality = content_plugin ? 0.0 : 0.5;
+      }
+      
+      TSDebug(DBG_TAG, "Setting quality to %3.1f", quality);
+       
+      /* set quality for this alternate */
+      TSHttpAltInfoQualitySet(infop, quality);
+       
+      /* cleanup */
+      if (accept_transform_field)
+         TSHandleMLocRelease(client_req_buf, client_req_hdr,
+            accept_transform_field);
+      TSHandleMLocRelease(client_req_buf, TS_NULL_MLOC, client_req_hdr);
+      
+      if (content_transform_field)
+         TSHandleMLocRelease(cache_resp_buf, cache_resp_hdr,
+            content_transform_field);
+      TSHandleMLocRelease(cache_resp_buf, TS_NULL_MLOC, cache_resp_hdr);
+   }
+       
+   static int alt_plugin(TSCont contp, TSEvent event, void *edata)
+   {
+      TSHttpAltInfo infop;
+      
+      switch (event) {
+         case TS_EVENT_HTTP_SELECT_ALT:
+            infop = (TSHttpAltInfo)edata;
+            handle_select_alt(infop);
+            break;
+
+         default:
+            break;
+      }
+      
+      return 0;
+   }
+       
+   void TSPluginInit (int argc, const char *argv[])
+   {
+      TSHttpHookAdd(TS_HTTP_SELECT_ALT_HOOK, TSContCreate (alt_plugin,
+         NULL));
+   }
 
 Traffic Server augments the alternate selection through these callouts
 using the following algorithm:
@@ -181,12 +180,10 @@ set the appropriate quality level for the alternate.
 
 The HTTP alternate selection functions are:
 
--  ```TSHttpAltInfoCachedReqGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#af4f3a56716e3e97afd582c7fdb14bcb7>`__
+-  `TSHttpAltInfoCachedReqGet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#af4f3a56716e3e97afd582c7fdb14bcb7>`_
 
--  ```TSHttpAltInfoCachedRespGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#aff5861ae4a4a7a6ce7b2d669c113b3bb>`__
+-  `TSHttpAltInfoCachedRespGet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#aff5861ae4a4a7a6ce7b2d669c113b3bb>`_
 
--  ```TSHttpAltInfoClientReqGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a74d494c6442b6012d8385e92f0e14dee>`__
+-  `TSHttpAltInfoClientReqGet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a74d494c6442b6012d8385e92f0e14dee>`_
 
--  ```TSHttpAltInfoQualitySet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a978b7160a048491d5698e0f4c0c79aad>`__
-
-.. |[Note]| image:: /images/docbook/note.png
+-  `TSHttpAltInfoQualitySet <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a978b7160a048491d5698e0f4c0c79aad>`_

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-transformation-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-transformation-plugin.en.rst b/doc/sdk/http-transformation-plugin.en.rst
index 8d6356f..bc01e0e 100644
--- a/doc/sdk/http-transformation-plugin.en.rst
+++ b/doc/sdk/http-transformation-plugin.en.rst
@@ -3,20 +3,20 @@ HTTP Transformation Plugins
 
 .. 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.
+   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.
 
 Transform plugins examine or transform HTTP message body content. For
 example, transform plugins can:
@@ -51,7 +51,7 @@ to buffer *and* checks to see if the end of the data stream is reached.
 This mechanism is provided by virtual connections (``VConnection``\ s)
 and virtual IO descriptors (``VIO``\ s).
 
-A **``VConnection``** is an abstraction for a data pipe that allows its
+A ``VConnection`` is an abstraction for a data pipe that allows its
 users to perform asynchronous reads and writes without knowing the
 underlying implementation. A transformation is a specific type of
 ``VConnection``. A **transformation** connects an input data source and
@@ -66,7 +66,7 @@ continuations. ``VConnection``\ s and transformations can thus exchange
 events, informing one another that data is available for reading or
 writing, or that the end of a data stream is reached.
 
-A **``VIO``** is a description of an IO operation that is in progress.
+A ``VIO`` is a description of an IO operation that is in progress.
 Every ``VConnection`` has an associated *input VIO* and an associated
 *output VIO*. When ``VConnection``\ s are transferring data to one
 another, one ``VConnection``'s input ``VIO`` is another
@@ -80,10 +80,11 @@ relationship between the transformation ``VConnection`` and its
 
 **Transformation and its ``VIO``\ s** {#TransformationAndVIOs}
 
-.. figure:: /images/sdk/vconnection.jpg
+.. figure:: /static/images/sdk/vconnection.jpg
    :alt: A Transformation and its VIOs
 
    A Transformation and its VIOs
+   
 Because the Traffic Server API places transformations directly in the
 response or request data stream, the transformation ``VConnection`` is
 responsible only for reading the data from the input buffer,
@@ -113,7 +114,7 @@ Transformations
 VIOs
 ~~~~
 
-A **``VIO``** or virtual IO is a description of an in progress IO
+A ``VIO``*or virtual IO is a description of an in progress IO
 operation. The ``VIO`` data structure is used by ``VConnection`` users
 to determine how much progress has been made on a particular IO
 operation, and to reenable an IO operation when it stalls due to buffer
@@ -125,17 +126,16 @@ made.
 The ``TSVIO`` data structure itself is opaque, but it might have been
 defined as follows:
 
-::
-
-    :::c
-    typedef struct {
-         TSCont continuation;
-         TSVConn vconnection;
-         TSIOBufferReader reader;
-         TSMutex mutex;
-         int nbytes;
-         int ndone;
-    } *TSVIO;
+.. code-block:: c
+
+   typedef struct {
+      TSCont continuation;
+      TSVConn vconnection;
+      TSIOBufferReader reader;
+      TSMutex mutex;
+      int nbytes;
+      int ndone;
+   } *TSVIO;
 
 IO Buffers
 ~~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst b/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst
index deacf8f..b9f6826 100644
--- a/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst
+++ b/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst
@@ -30,184 +30,183 @@ buffer to the downstream vconnection.
 The following is a step-by-step walk through the buffered null
 transform:
 
-1.  Gets a handle to HTTP transactions.
+#.  Gets a handle to HTTP transactions.
 
-    ::
-
-        :::c
-        void
-        TSPluginInit (int argc, const char *argv[]) {
+   .. code-block:: c
+   
+      void
+         TSPluginInit (int argc, const char *argv[]) {
             TSHttpHookAdd (TS_HTTP_READ_RESPONSE_HDR_HOOK,
-                    TSContCreate (transform_plugin, NULL)); }
-
-    With this ``TSPluginInit`` routine, the plugin is called back every
-    time Traffic Server reads a response header.
-
-2.  Checks to see if the transaction response is transformable.
-
-    ::
-
-        :::c
-        static int transform_plugin (TSCont contp, TSEvent event, void *edata) {
-            TSHttpTxn txnp = (TSHttpTxn) edata;
-            switch (event) {
-                case TS_EVENT_HTTP_READ_RESPONSE_HDR:
-                    if (transformable (txnp)) {
-                        transform_add (txnp);
-                    }
-
-    The default behavior for transformations is to cache the transformed
-    content (if desired, you also can tell Traffic Server to cache
-    untransformed content). Therefore, only responses received directly
-    from an origin server need to be transformed. Objects served from
-    the cache are already transformed. To determine whether the response
-    is from the origin server, the routine transformable checks the
-    response header for the "200 OK" server response.
-
-    ::
-
-        :::c
-        {
-            TSMBuffer bufp;
-            TSMLoc hdr_loc;
-            TSHttpStatus resp_status;
-
-            TSHttpTxnServerRespGet (txnp, &bufp, &hdr_loc);
-
-            if(TS_HTTP_STATUS_OK==
-                    (resp_status=TSHttpHdrStatusGet(bufp,hdr_loc)))
-            {
-                return 1;
-            }
-            else {
-                return 0;
-            }
-        }
-
-3.  If the response is transformable, then the plugin creates a
-    transformation vconnection that gets called back when the response
-    data is ready to be transformed (as it is streaming from the origin
-    server).
-
-    ::
-
-        :::c
-        static void transform_add (TSHttpTxn txnp)
-        {
-            TSVConn connp;
-            connp = TSTransformCreate (bnull_transform, txnp);
-            TSHttpTxnHookAdd (txnp, TS_HTTP_RESPONSE_TRANSFORM_HOOK, connp);
-        }
-
-    The previous code fragment shows that the handler function for the
-    transformation vconnection is ``bnull_transform``.
-
-4.  The ``bnull_transform`` function has to handle ``ERROR``,
-    ``WRITE_COMPLETE``, ``WRITE_READY``, and ``IMMEDIATE`` events. If
-    the transform is just beginning, the event received is probably
-    ``IMMEDIATE``. The ``bnull_transform`` function calls
-    ``handle_transform`` to handle ``WRITE_READY`` and ``IMMEDIATE``.
-
-5.  The ``handle_transform`` function examines the data parameter for
-    the continuation passed to it (the continuation passed to
-    ``handle_transform`` is the transformation vconnection). The data
-    structure keeps track of two states: copying the data into the
-    buffer (``STATE_BUFFER_DATA``) and writing the contents of the
-    buffer to the output vconnection (``STATE_OUTPUT_DATA``).
-
-6.  Get a handle to the input VIO (see the ``handle_buffering``
-    function). ``input_vio = TSVConnWriteVIOGet (contp);`` This is so
-    that the transformation can get information about the upstream
-    vconnection's write operation to the input buffer.
-
-7.  Copy data from the input buffer to the output buffer. See the
-    ``handle_buffering`` function for the following code fragment:
-
-    ::
-
-        :::c
-        TSIOBufferCopy (data->output_buffer,
-                TSVIOReaderGet (write_vio), towrite, 0);
-
-8.  Tell the input buffer that the transformation has read the data. See
-    the ``handle_buffering`` function for the following code fragment:
-    ``TSIOBufferReaderConsume (TSVIOReaderGet (write_vio), towrite);``
-
-9.  Modify the input VIO to tell it how much data has been read
-    (increase the value of ``ndone``). See the ``handle_buffering``
-    function for the following code fragment:
-    ``TSVIONDoneSet (write_vio, TSVIONDoneGet (write_vio) + towrite); }``
-
-10. If there is more data left to read ( if ndone < nbytes), then the
-    ``handle_buffering`` function wakes up the upstream vconnection by
-    sending it ``WRITE_READY``:
-
-    ::
-
-        :::c
-        if (TSVIONTodoGet (write_vio) > 0) {
-            if (towrite > 0) {
-                TSContCall (TSVIOContGet (write_vio),
-                        TS_EVENT_VCONN_WRITE_READY, write_vio);
-            }
-        } else {
-
-    The process of passing data through the transformation is
-    illustrated in the following diagram. The transformation sends
-    ``WRITE_READY`` events when it needs more data; when data is
-    available, the upstream vconnection reenables the transformation
-    with an ``IMMEDIATE`` event.
-
-    The following diagram illustrates the read from an input
-    vconnection:
-
-    **Reading Data Into the Buffer (the ``STATE_BUFFER_DATA`` State)**
-    {#ReadingDataIntoBuffer}
-
-    .. figure:: /images/sdk/vconn_buffer.jpg
-       :alt: Reading Data Into the Buffer the STATE\_BUFFER\_DATA State
-
-       Reading Data Into the Buffer the STATE\_BUFFER\_DATA State
-11. When the data is read into the output buffer, the
-    ``handle_buffering`` function sets the state of the transformation's
-    data structure to ``STATE_OUTPUT_DATA`` and calls the upstream
-    vconnection back with the ``WRITE_COMPLETE`` event.
-
-    ::
-
-        :::c
-        data->state = STATE_OUTPUT_DATA;
-        TSContCall (TSVIOContGet (write_vio),
-                 TS_EVENT_VCONN_WRITE_COMPLETE, write_vio);
-
-12. The upstream vconnection will probably shut down the write operation
-    when it receives the ``WRITE_COMPLETE`` event. The handler function
-    of the transformation, ``bnull_transform``, receives an
-    ``IMMEDIATE`` event and calls the ``handle_transform`` function.
-    This time, the state is ``STATE_OUTPUT_DATA``, so
-    ``handle_transform`` calls ``handle_output``.
-
-13. The ``handle_output`` function gets a handle to the output
-    vconnection: ``output_conn = TSTransformOutputVConnGet (contp);``
-
-14. The ``handle_output`` function writes the buffer to the output
-    vconnection:
-
-    ::
-
-        :::c
-        data->output_vio =
-        TSVConnWrite (output_conn, contp, data->output_reader,
-        TSIOBufferReaderAvail (data->output_reader) );
-
-    The following diagram illustrates the write to the output
-    vconnection:
-
-    **Writing the Buffered Data to the Output Vconnection**
-    {#WritingBufferedtDataIntoVConnection)
-
-    .. figure:: /images/sdk/vconn_buf_output.jpg
-       :alt: Writing the Buffered Data to the Output Vconnection
-
-       Writing the Buffered Data to the Output Vconnection
+               TSContCreate (transform_plugin, NULL)); }
+
+   With this ``TSPluginInit`` routine, the plugin is called back every
+   time Traffic Server reads a response header.
+
+#.  Checks to see if the transaction response is transformable.
+
+   .. code-block:: c
+   
+      static int transform_plugin (TSCont contp, TSEvent event, void *edata) {
+         TSHttpTxn txnp = (TSHttpTxn) edata;
+         switch (event) {
+            case TS_EVENT_HTTP_READ_RESPONSE_HDR:
+               if (transformable (txnp)) {
+                  transform_add (txnp);
+               }
+
+   The default behavior for transformations is to cache the transformed
+   content (if desired, you also can tell Traffic Server to cache
+   untransformed content). Therefore, only responses received directly
+   from an origin server need to be transformed. Objects served from
+   the cache are already transformed. To determine whether the response
+   is from the origin server, the routine transformable checks the
+   response header for the "200 OK" server response.
+
+   .. code-block:: c
+   
+      {
+         TSMBuffer bufp;
+         TSMLoc hdr_loc;
+         TSHttpStatus resp_status;
+   
+         TSHttpTxnServerRespGet (txnp, &bufp, &hdr_loc);
+   
+         if(TS_HTTP_STATUS_OK==
+            (resp_status=TSHttpHdrStatusGet(bufp,hdr_loc)))
+         {
+            return 1;
+         }
+         else {
+            return 0;
+         }
+      }
+
+#. If the response is transformable, then the plugin creates a
+   transformation vconnection that gets called back when the response
+   data is ready to be transformed (as it is streaming from the origin
+   server).
+
+   .. code-block:: c
+   
+      static void transform_add (TSHttpTxn txnp)
+      {
+         TSVConn connp;
+         connp = TSTransformCreate (bnull_transform, txnp);
+         TSHttpTxnHookAdd (txnp, TS_HTTP_RESPONSE_TRANSFORM_HOOK, connp);
+      }
+
+   The previous code fragment shows that the handler function for the
+   transformation vconnection is ``bnull_transform``.
+
+#. The ``bnull_transform`` function has to handle ``ERROR``,
+   ``WRITE_COMPLETE``, ``WRITE_READY``, and ``IMMEDIATE`` events. If
+   the transform is just beginning, the event received is probably
+   ``IMMEDIATE``. The ``bnull_transform`` function calls
+   ``handle_transform`` to handle ``WRITE_READY`` and ``IMMEDIATE``.
+
+#. The ``handle_transform`` function examines the data parameter for
+   the continuation passed to it (the continuation passed to
+   ``handle_transform`` is the transformation vconnection). The data
+   structure keeps track of two states: copying the data into the
+   buffer (``STATE_BUFFER_DATA``) and writing the contents of the
+   buffer to the output vconnection (``STATE_OUTPUT_DATA``).
+
+#. Get a handle to the input VIO (see the ``handle_buffering``
+   function). ``input_vio = TSVConnWriteVIOGet (contp);`` This is so
+   that the transformation can get information about the upstream
+   vconnection's write operation to the input buffer.
+
+#. Copy data from the input buffer to the output buffer. See the
+   ``handle_buffering`` function for the following code fragment:
+
+   .. code-block:: c
+   
+      TSIOBufferCopy (data->output_buffer,
+         TSVIOReaderGet (write_vio), towrite, 0);
+
+#. Tell the input buffer that the transformation has read the data. See
+   the ``handle_buffering`` function for the following code fragment:
+   
+   .. code-block:: c
+   
+      TSIOBufferReaderConsume (TSVIOReaderGet (write_vio), towrite);
+
+#. Modify the input VIO to tell it how much data has been read
+   (increase the value of ``ndone``). See the ``handle_buffering``
+   function for the following code fragment:
+   
+   .. code-block:: c
+   
+      TSVIONDoneSet (write_vio, TSVIONDoneGet (write_vio) + towrite); }
+
+#. If there is more data left to read ( if ndone < nbytes), then the
+   ``handle_buffering`` function wakes up the upstream vconnection by
+   sending it ``WRITE_READY``:
+
+   .. code-block:: c
+   
+      if (TSVIONTodoGet (write_vio) > 0) {
+         if (towrite > 0) {
+            TSContCall (TSVIOContGet (write_vio),
+               TS_EVENT_VCONN_WRITE_READY, write_vio);
+         }
+      } else {
+
+   The process of passing data through the transformation is
+   illustrated in the following diagram. The transformation sends
+   ``WRITE_READY`` events when it needs more data; when data is
+   available, the upstream vconnection reenables the transformation
+   with an ``IMMEDIATE`` event.
+
+   The following diagram illustrates the read from an input
+   vconnection:
+
+   **Reading Data Into the Buffer (the ``STATE_BUFFER_DATA`` State)**
+   {#ReadingDataIntoBuffer}
+
+   .. figure:: /static/images/sdk/vconn_buffer.jpg
+      :alt: Reading Data Into the Buffer the STATE\_BUFFER\_DATA State
+
+      Reading Data Into the Buffer the STATE\_BUFFER\_DATA State
+
+#. When the data is read into the output buffer, the
+   ``handle_buffering`` function sets the state of the transformation's
+   data structure to ``STATE_OUTPUT_DATA`` and calls the upstream
+   vconnection back with the ``WRITE_COMPLETE`` event.
+
+   .. code-block:: c
+   
+      data->state = STATE_OUTPUT_DATA;
+      TSContCall (TSVIOContGet (write_vio),
+         TS_EVENT_VCONN_WRITE_COMPLETE, write_vio);
+
+#. The upstream vconnection will probably shut down the write operation
+   when it receives the ``WRITE_COMPLETE`` event. The handler function
+   of the transformation, ``bnull_transform``, receives an
+   ``IMMEDIATE`` event and calls the ``handle_transform`` function.
+   This time, the state is ``STATE_OUTPUT_DATA``, so
+   ``handle_transform`` calls ``handle_output``.
+
+#. The ``handle_output`` function gets a handle to the output
+   vconnection: ``output_conn = TSTransformOutputVConnGet (contp);``
+
+#. The ``handle_output`` function writes the buffer to the output
+   vconnection:
+
+.. code-block:: c
+
+   data->output_vio =
+      TSVConnWrite (output_conn, contp, data->output_reader,
+      TSIOBufferReaderAvail (data->output_reader) );
+
+   The following diagram illustrates the write to the output
+   vconnection:
+
+   **Writing the Buffered Data to the Output Vconnection**
+   {#WritingBufferedtDataIntoVConnection)
+
+   .. figure:: /static/images/sdk/vconn_buf_output.jpg
+      :alt: Writing the Buffered Data to the Output Vconnection
+
+      Writing the Buffered Data to the Output Vconnection
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/http-transformation-plugin/sample-null-transformation-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/http-transformation-plugin/sample-null-transformation-plugin.en.rst b/doc/sdk/http-transformation-plugin/sample-null-transformation-plugin.en.rst
index af2b12e..91f7612 100644
--- a/doc/sdk/http-transformation-plugin/sample-null-transformation-plugin.en.rst
+++ b/doc/sdk/http-transformation-plugin/sample-null-transformation-plugin.en.rst
@@ -180,10 +180,10 @@ Below is an overview of the null transform plugin:
     **Passing Data Through a Transformation**
     {#PassingDataThroughaTransformation}
 
-.. figure:: /images/sdk/vconnection1.jpg
-   :alt: Passing Data Through a Transformation
+.. figure:: /static/images/sdk/vconnection1.jpg
+      :alt: Passing Data Through a Transformation
 
-   Passing Data Through a Transformation
+      Passing Data Through a Transformation
 
 11. If the ``handle_transform`` function finds there is no more data to
     read, then it sets ``nbytes`` to ``ndone`` on the output
@@ -192,16 +192,13 @@ Below is an overview of the null transform plugin:
     upstream vconnection by sending the upstream vconnection a
     ``WRITE_COMPLETE`` event.
 
-    ::
-
-        :::c
-        } else {
+    .. code-block:: c
 
-            TSVIONBytesSet (data->output_vio, TSVIONDoneGet (input_vio));
-            TSVIOReenable (data->output_vio);
-            TSContCall (TSVIOContGet (input_vio),
-                    TS_EVENT_VCONN_WRITE_COMPLETE, input_vio);
-        }
+      TSVIONBytesSet (data->output_vio, TSVIONDoneGet (input_vio));
+         TSVIOReenable (data->output_vio);
+         TSContCall (TSVIOContGet (input_vio),
+            TS_EVENT_VCONN_WRITE_COMPLETE, input_vio);
+      }
 
     When the upstream vconnection receives the ``WRITE_COMPLETE`` event,
     it will probably shut down the write operation.
@@ -224,7 +221,7 @@ Below is an overview of the null transform plugin:
 
     **Ending the Transformation** {#EndingTransformation}
 
-    .. figure:: /images/sdk/vconnection2.jpg
+    .. figure:: /static/images/sdk/vconnection2.jpg
        :alt: Ending the Transformation
 
        Ending the Transformation

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8226827f/doc/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst b/doc/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
index ab80e7c..b3341a6 100644
--- a/doc/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
+++ b/doc/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
@@ -3,20 +3,20 @@ Reading Traffic Server Settings and Statistics
 
 .. 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.
+   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.
 
 Your plugin might need to know information about Traffic Server's
 current configuration and performance. The functions described in this
@@ -24,16 +24,12 @@ section read this information from the Traffic Server :file:`records.config`
 file. Configuration settings are stored in ``CONFIG`` variables and
 statistics are stored in ``PROCESS`` variables.
 
-.. figure:: /images/docbook/caution.png
-   :alt: [Caution]
+.. caution::
 
-   [Caution]
-**Caution**
-
-Not all ``CONFIG`` and ``PROCESS`` variables in :file:`records.config` are
-relevant to Traffic Server's configuration and statistics. Therefore,
-retrieve only the :file:`records.config` variables that are documented in
-the `Traffic Server Administrator's Guide <../../admin/>`__.
+   Not all ``CONFIG`` and ``PROCESS`` variables in :file:`records.config` are
+   relevant to Traffic Server's configuration and statistics. Therefore,
+   retrieve only the :file:`records.config` variables that are documented in
+   the `Traffic Server Administrator's Guide <../../admin/>`__.
 
 To retrieve a variable, you need to know its type (``int``, ``counter``,
 ``float``, or ``string``). Plugins store the :file:`records.config` values