trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew...@apache.org
Subject svn commit: r831152 [15/37] - in /incubator/trafficserver/site/trunk/docs: ./ admin/ admin/images/ sdk/ sdk/css/ sdk/images/ sdk/images/docbook/ sdk/js/
Date Thu, 29 Oct 2009 23:23:36 GMT
Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaderFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaderFunctions.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaderFunctions.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaderFunctions.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,970 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>HTTP Header Functions</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="MarshallBuffersFunctions.html" title="Marshal Buffers">
+<link rel="prev" href="INKMBufferDestroy.html" title="INKMBufferDestroy">
+<link rel="next" href="URLFunctions.html" title="URL Functions">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrClone" title="INKHttpHdrClone">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrCopy" title="INKHttpHdrCopy">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrCreate" title="INKHttpHdrCreate">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrDestroy" title="INKHttpHdrDestroy">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrLengthGet" title="INKHttpHdrLengthGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrMethodGet" title="INKHttpHdrMethodGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrMethodSet" title="INKHttpHdrMethodSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrPrint" title="INKHttpHdrPrint">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrReasonGet" title="INKHttpHdrReasonGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrReasonLookup" title="INKHttpHdrReasonLookup">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrReasonSet" title="INKHttpHdrReasonSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrStatusGet" title="INKHttpHdrStatusGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrStatusSet" title="INKHttpHdrStatusSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrTypeGet" title="INKHttpHdrTypeGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrTypeSet" title="INKHttpHdrTypeSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrUrlGet" title="INKHttpHdrUrlGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrUrlSet" title="INKHttpHdrUrlSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrVersionGet" title="INKHttpHdrVersionGet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrVersionSet" title="INKHttpHdrVersionSet">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpParserClear" title="INKHttpParserClear">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpParserCreate" title="INKHttpParserCreate">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpParserDestroy" title="INKHttpParserDestroy">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrParseReq" title="INKHttpHdrParseReq">
+<link rel="subsection" href="HTTPHeaderFunctions.html#INKHttpHdrParseResp" title="INKHttpHdrParseResp">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKMBufferDestroy.html">Prev</a> — INKMBufferDestroy</div>
+<div class="navnext">URL Functions — <a accesskey="n" href="URLFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="HTTPHeaderFunctions"></a>HTTP Header Functions</h3></div></div></div>
+<p>The HTTP header functions are:</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrClone"></a>INKHttpHdrClone</h4></div></div></div>
+<p>Copies an HTTP header to a marshal buffer and returns the
+          INKMLoc location of the copied header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKMLoc INKHttpHdrClone (INKMBuffer
+                <em class="replaceable"><code>dest_bufp</code></em>, INKMBuffer
+                <em class="replaceable"><code>src_bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>src_hdr</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Copies the contents of the HTTP header located at
+                <code class="code"><em class="replaceable"><code>src_hdr</code></em></code> within the
+                marshal buffer
+                <code class="code"><em class="replaceable"><code>src_bufp</code></em></code> to the
+                marshal buffer located at
+                <code class="code"><em class="replaceable"><code>dest_bufp</code></em></code>. If the HTTP
+                header located at the
+                <code class="code"><em class="replaceable"><code>src_hdr</code></em></code> is a HTTP
+                request header, ensure that it has a valid method, url,
+                protocol and version. If the HTTP header located at the
+                <code class="code"><em class="replaceable"><code>src_hdr</code></em></code> is a HTTP
+                response header, ensure that it has a valid protocol, version,
+                status and reason.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+<p>Release the returned handle with a call to
+                <code class="function">INKHandleMLocRelease</code>.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>Returns the <code class="function">INKMLoc</code> location of the
+                copied header.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.5</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrCopy"></a>INKHttpHdrCopy</h4></div></div></div>
+<p>Copies an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrCopy (INKMBuffer
+                <em class="replaceable"><code>dest_bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>dest_hdr_loc</code></em>, INKMBuffer
+                <em class="replaceable"><code>src_bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>src_hdr_loc</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Copies the contents of the HTTP header located at
+                <code class="code"><em class="replaceable"><code>src_hdr_loc</code></em></code> within the
+                marshal buffer
+                <code class="code"><em class="replaceable"><code>src_bufp</code></em></code> to the HTTP
+                header located at
+                <code class="code"><em class="replaceable"><code>dest_hdr_loc</code></em></code> within
+                the marshal buffer
+                <code class="code"><em class="replaceable"><code>dest_bufp</code></em></code>.
+                <code class="function">INKHttpHdrCopy</code> works correctly even if
+                <code class="code"><em class="replaceable"><code>src_bufp</code></em></code> and
+                <code class="code"><em class="replaceable"><code>dest_bufp</code></em></code> point to
+                different marshal buffers. Make sure that the destination HTTP
+                header exists (has been created) before copying into it.
+                <code class="function">INKHttpHdrCopy</code> automatically makes sure
+                that types of the source and destination HTTP headers match;
+                if the destination type is not equal to the source type,
+                <code class="function">INKHttpHdrCopy</code> calls
+                <code class="function">INKHttpHdrTypeSet</code>. Do not call
+                <code class="function">INKHttpHdrTypeSet</code> on the destination
+                header after using <code class="function">INKHttpHdrCopy</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p><code class="function">INKHttpHdrCopy</code> appends the port
+                  number to the domain of the URL portion of the header. For
+                  example,</p></td></tr>
+</table></div>
+<p><code class="code">http://www.inktomi.com</code> appears as
+                <code class="code">http://www.inktomi.com:80/</code> in the destination
+                buffer.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrCreate"></a>INKHttpHdrCreate</h4></div></div></div>
+<p>Creates a new HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKMLoc INKHttpHdrCreate (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Creates a new HTTP header with the marshal buffer
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>. When newly
+                created, the HTTP header is assigned an
+                <code class="function">INKHttpType</code> value of
+                <code class="code">INK_HTTP_TYPE_UNKNOWN</code>. You can change the type
+                after creating the header using
+                <code class="function">INKHttpHdrTypeSet</code>, but you can only
+                change the type once. You cannot modify the type after setting
+                it.</p>
+<p>Release with a call to
+                <code class="function">INKHandleMLocRelease</code>.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd><p>A pointer to the new HTTP header.</p></dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrDestroy"></a>INKHttpHdrDestroy</h4></div></div></div>
+<p>Destroys an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrDestroy (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Destroys the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>.</p>
+<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/docbook/caution.png"></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td align="left" valign="top"><p>Do not forget to use
+                  <code class="function">INKHandleMLocRelease</code> to release the
+                  handle
+                  <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code>.</p></td></tr>
+</table></div>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+                successfully.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrLengthGet"></a>INKHttpHdrLengthGet</h4></div></div></div>
+<p>Calculates the length of an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">int INKHttpHdrLengthGet (INKMBuffer bufp, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Calculates the length of the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code> if
+                it were returned as a string. This is the length of the HTTP
+                header in its un-parsed form and is also the number of bytes
+                that will be added to the IO buffer by a call to
+                <code class="function">INKHttpHdrPrint</code>.</p>
+<p>The header could be a request header, response header,
+                or a standalone header that you have created. Be sure to call
+                this function appropriately (if you want the length of a
+                request header, call this function after
+                <code class="code">READ_REQUEST_HDR_HOOK</code>, for example).</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>The length of the specified HTTP header.</p>
+<p><code class="code">INK_ERROR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrMethodGet"></a>INKHttpHdrMethodGet</h4></div></div></div>
+<p>Gets the method portion of an HTTP request header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">const char* INKHttpHdrMethodGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, int
+                *<em class="replaceable"><code>length</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the method from the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                The length of the returned string is placed in the length
+                argument. If length is <code class="code">NULL</code>, then no attempt is
+                made to de-reference it.</p>
+<p>It is an error to try and retrieve the method from an
+                HTTP header which is not of type
+                <code class="code">INK_HTTP_TYPE_REQUEST</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+<p>Release with a call to
+                <code class="function">INKHandleStringRelease</code>.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>A pointer to the method portion of the specified HTTP
+                request header.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrMethodSet"></a>INKHttpHdrMethodSet</h4></div></div></div>
+<p>Set the HTTP method.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrMethodSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, const char
+                *<em class="replaceable"><code>value</code></em>, int
+                <em class="replaceable"><code>length</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Sets the method in the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                If <code class="code"><em class="replaceable"><code>length</code></em></code> is -1 then
+                it is assumed that value is null-terminated. Otherwise, the
+                length of the string value is taken to be length. The string
+                is copied to within
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>, so it is okay to
+                modify or delete value after calling
+                <code class="function">INKHttpHdrMethodSet</code>. It is an error to
+                try and set the method in an HTTP header which is not of type
+                <code class="code">INK_HTTP_TYPE_REQUEST</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrPrint"></a>INKHttpHdrPrint</h4></div></div></div>
+<p>Prints the HTTP header to an IO buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrPrint (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, INKIOBuffer
+                <em class="replaceable"><code>iobufp</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Formats the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>
+                into the IO buffer
+                <code class="code"><em class="replaceable"><code>iobufp</code></em></code>. See IO
+                buffers‚ on page 128 for information on allocating an IO
+                Buffer and retrieving data from within one.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+                successfully.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrReasonGet"></a>INKHttpHdrReasonGet</h4></div></div></div>
+<p>Gets the reason phrase from an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">const char* INKHttpHdrReasonGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, int
+                *<em class="replaceable"><code>length</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the reason phrase from the HTTP header located
+                at <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                The length of the returned string is placed in the
+                <code class="code"><em class="replaceable"><code>length</code></em></code> argument. It is
+                an error to try and retrieve the reason phrase from an HTTP
+                header which is not of type
+                <code class="code">INK_HTTP_TYPE_RESPONSE</code>.</p>
+<p>Call after <code class="code">READ_RESPONSE_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>The returned string is not guaranteed to be
+                  null-terminated.</p></td></tr>
+</table></div>
+<p>Release with a call to
+                <code class="function">INKHandleStringRelease</code>.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>Pointer to the reason phrase in the specified HTTP
+                header.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrReasonLookup"></a>INKHttpHdrReasonLookup</h4></div></div></div>
+<p>Provides the default reason phrase for a specified Traffic
+          Server HTTP status code.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">const char* INKHttpHdrReasonLookup (INKHttpStatus
+                <em class="replaceable"><code>status</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Returns the default reason phrase for the status code
+                <code class="code"><em class="replaceable"><code>status</code></em></code>.</p>
+<p><code class="function">INKHttpHdrReasonLookup</code> returns a
+                string which is null-terminated and should not be freed or
+                released. It's a global shared value.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>Pointer to the default reason phrase for the specified
+                Traffic Server status code.</p>
+<p>INK_ERROR_PTR if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrReasonSet"></a>INKHttpHdrReasonSet</h4></div></div></div>
+<p>Sets the reason phrase in an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrReasonSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, const char
+                *<em class="replaceable"><code>value</code></em>, int
+                <em class="replaceable"><code>length</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Sets the reason phrase in the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                If <code class="code"><em class="replaceable"><code>length</code></em></code> is -1 then
+                it is assumed that
+                <code class="code"><em class="replaceable"><code>value</code></em></code> is
+                null-terminated. Otherwise, the length of the string value is
+                taken to be <code class="code"><em class="replaceable"><code>length</code></em></code>.
+                The string is copied to within
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>, so it is okay to
+                modify or delete <code class="code"><em class="replaceable"><code>value</code></em></code>
+                after calling <code class="function">INKHttpHdrReasonSet</code>. It is
+                an error to try and set the reason phrase in an HTTP header
+                which is not of type
+                <code class="code">INK_HTTP_TYPE_RESPONSE</code>.</p>
+<p>Call after <code class="code">READ_RESPONSE_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+                successfully.</p>
+<p><code class="code">INK_ERROR</code> if the operation does not
+                complete successfully.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrStatusGet"></a>INKHttpHdrStatusGet</h4></div></div></div>
+<p>Retrieves the status code from an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKHttpStatus INKHttpHdrStatusGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the status code from the HTTP header located
+                at <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                It is an error to try and retrieve the status code from an
+                HTTP header which is not of type
+                <code class="code">INK_HTTP_TYPE_RESPONSE</code>.
+                <code class="function">INKHttpStatus</code> is an enumerated
+                type.</p>
+<p>Call after <code class="code">READ_RESPONSE_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>The status code from the specified HTTP header.</p>
+<p><code class="code">INK_ERROR</code> if error.</p>
+</dd>
+<dt><span class="term">Example</span></dt>
+<dd>
+<p>The values of <code class="function">INKHttpStatus</code> are the
+                following:</p>
+<pre class="programlisting">typedef enum
+{
+    INK_HTTP_STATUS_NONE                          = 0,
+
+    INK_HTTP_STATUS_CONTINUE                      = 100,
+    INK_HTTP_STATUS_SWITCHING_PROTOCOL            = 101,
+
+    INK_HTTP_STATUS_OK                            = 200,
+    INK_HTTP_STATUS_CREATED                       = 201,
+    INK_HTTP_STATUS_ACCEPTED                      = 202,
+    INK_HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 203,
+    INK_HTTP_STATUS_NO_CONTENT                    = 204,
+    INK_HTTP_STATUS_RESET_CONTENT                 = 205,
+    INK_HTTP_STATUS_PARTIAL_CONTENT               = 206,
+
+    INK_HTTP_STATUS_MULTIPLE_CHOICES              = 300,
+    INK_HTTP_STATUS_MOVED_PERMANENTLY             = 301,
+    INK_HTTP_STATUS_MOVED_TEMPORARILY             = 302,
+    INK_HTTP_STATUS_SEE_OTHER                     = 303,
+    INK_HTTP_STATUS_NOT_MODIFIED                  = 304,
+    INK_HTTP_STATUS_USE_PROXY                     = 305,
+
+    INK_HTTP_STATUS_BAD_REQUEST                   = 400,
+    INK_HTTP_STATUS_UNAUTHORIZED                  = 401,
+    INK_HTTP_STATUS_PAYMENT_REQUIRED              = 402,
+    INK_HTTP_STATUS_FORBIDDEN                     = 403,
+    INK_HTTP_STATUS_NOT_FOUND                     = 404,
+    INK_HTTP_STATUS_METHOD_NOT_ALLOWED            = 405,
+    INK_HTTP_STATUS_NOT_ACCEPTABLE                = 406,
+    INK_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407,
+    INK_HTTP_STATUS_REQUEST_TIMEOUT               = 408,
+    INK_HTTP_STATUS_CONFLICT                      = 409,
+    INK_HTTP_STATUS_GONE                          = 410,
+    INK_HTTP_STATUS_LENGTH_REQUIRED               = 411,
+    INK_HTTP_STATUS_PRECONDITION_FAILED           = 412,
+    INK_HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE      = 413,
+    INK_HTTP_STATUS_REQUEST_URI_TOO_LONG          = 414,
+    INK_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE        = 415,
+
+    INK_HTTP_STATUS_INTERNAL_SERVER_ERROR         = 500,
+    INK_HTTP_STATUS_NOT_IMPLEMENTED               = 501,
+    INK_HTTP_STATUS_BAD_GATEWAY                   = 502,
+    INK_HTTP_STATUS_SERVICE_UNAVAILABLE           = 503,
+    INK_HTTP_STATUS_GATEWAY_TIMEOUT               = 504,
+    INK_HTTP_STATUS_HTTPVER_NOT_SUPPORTED         = 505
+} INKHttpStatus;</pre>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrStatusSet"></a>INKHttpHdrStatusSet</h4></div></div></div>
+<p>Sets the status code within an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrStatusSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, INKHttpStatus
+                <em class="replaceable"><code>status</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Sets the status code in the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                It is an error to try and set the
+                <code class="code"><em class="replaceable"><code>status</code></em></code> code in an HTTP
+                header which is not of type
+                <code class="code">INK_HTTP_TYPE_RESPONSE</code>.</p>
+<p>Call after <code class="code">READ_RESPONSE_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrTypeGet"></a>INKHttpHdrTypeGet</h4></div></div></div>
+<p>Retrieves the HTTP header type.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKHttpType INKHttpHdrTypeGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the type of the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                <code class="function">INKHttpType</code> is an enumerated type.</p>
+<pre class="programlisting">typedef enum
+{
+    INK_HTTP_TYPE_UNKNOWN,
+    INK_HTTP_TYPE_REQUEST,
+    INK_HTTP_TYPE_RESPONSE
+} INKHttpType;</pre>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>The type of the specified HTTP header.</p>
+<p><code class="code">INK_ERROR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrTypeSet"></a>INKHttpHdrTypeSet</h4></div></div></div>
+<p>Sets the HTTP header type.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrTypeSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, INKHttpType
+                <em class="replaceable"><code>type</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Sets the type of the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code> to
+                <code class="code"><em class="replaceable"><code>type</code></em></code>. Use
+                <code class="function">INKHttpHdrTypeSet</code> only after you create
+                an HTTP header. The <code class="function">INKHttpHdrCreate</code>
+                function automatically assigns the new header a type of
+                <code class="code">INK_HTTP_TYPE_UNKNOWN</code>, and you would only use
+                <code class="function">INKHttpHdrTypeSet</code> to change the type of a
+                header from <code class="code">INK_HTTP_TYPE_UNKNOWN</code> to either
+                <code class="code">INK_HTTP_TYPE_REQUEST</code> or
+                <code class="code">INK_HTTP_TYPE_RESPONSE.You</code> can only change the
+                type once. You cannot modify the type after setting it.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrUrlGet"></a>INKHttpHdrUrlGet</h4></div></div></div>
+<p>Gets the location of the URL portion of an HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKMLoc INKHttpHdrUrlGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>req_hdr_loc</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the URL from the HTTP header located at
+                <code class="code"><em class="replaceable"><code>req_hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                It is an error to try and retrieve the URL from an HTTP header
+                which is not of type
+                <code class="code">INK_HTTP_TYPE_REQUEST</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+<p>Release with a call to
+                <code class="function">INKHandleMLocRelease</code>. When you release
+                the handle created by <code class="function">INKHttpHdrUrlGet</code>,
+                the parent should be
+                <code class="code"><em class="replaceable"><code>req_hdr_loc</code></em></code>.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>The URL from the specified HTTP header.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrUrlSet"></a>INKHttpHdrUrlSet</h4></div></div></div>
+<p>Sets a URL location within an HTTP request header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrUrlSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, INKMLoc
+                <em class="replaceable"><code>url</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Sets the URL in the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                It is an error to try and set the URL in an HTTP header which
+                is not of type <code class="code">INK_HTTP_TYPE_REQUEST</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrVersionGet"></a>INKHttpHdrVersionGet</h4></div></div></div>
+<p>Retrieves the HTTP version of the specified HTTP
+          header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">int INKHttpHdrVersionGet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Retrieves the version from the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+                An HTTP version is composed of a major and a minor version.
+                Traffic Server encodes the major version in the upper 16 bits
+                of the returned integer and the minor version in the lower 16
+                bits. The macros <code class="code">INK_HTTP_MAJOR</code> (ver) and
+                <code class="code">INK_HTTP_MINOR</code> (ver) can be used to extract the
+                major and minor versions respectively.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>The HTTP version from the specified HTTP header.</p>
+<p><code class="code">INK_ERROR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrVersionSet"></a>INKHttpHdrVersionSet</h4></div></div></div>
+<p>Sets the HTTP version of the specified HTTP header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHdrVersionSet (INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, int
+                <em class="replaceable"><code>ver</code></em>) </code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Sets the version in the HTTP header located at
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> within the
+                marshal buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code> to
+                <code class="code"><em class="replaceable"><code>ver</code></em></code>. An HTTP version
+                is composed of a major and a minor version. Traffic Server
+                encodes the major version in the upper 16 bits of the returned
+                integer and the minor version in the lower 16 bits. The macro
+                <code class="code">INK_HTTP_VERSION</code> (maj, min) can be used to encode
+                a major and minor version into the single integer expected by
+                <code class="function">INKHttpHdrVersionSet</code>.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+                successfully.</p>
+<p><code class="code">INK_ERROR</code> if the operation does not
+                complete successfully.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpParserClear"></a>INKHttpParserClear</h4></div></div></div>
+<p>Clears an HTTP parser.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpParserClear (INKHttpParser
+                <em class="replaceable"><code>parser</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Clears the specified HTTP
+                <code class="code"><em class="replaceable"><code>parser</code></em></code> so it may be
+                used again.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if successful.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpParserCreate"></a>INKHttpParserCreate</h4></div></div></div>
+<p>Creates a parser for HTTP headers.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKHttpParser INKHttpParserCreate
+                (void)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Creates an HTTP parser. The parser’s data structure
+                contains information about the header being parsed. A single
+                HTTP parser can be used multiple times, though not
+                simultaneously. Before being used again, the parser must be
+                cleared by calling
+                <code class="function">INKHttpParserClear</code>.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p>Parser structure for HTTP headers.</p>
+<p><code class="code">INK_ERROR_PTR</code> if error.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpParserDestroy"></a>INKHttpParserDestroy</h4></div></div></div>
+<p>Destroys an HTTP parser.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpParserDestroy (INKHttpParser
+                <em class="replaceable"><code>parser</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Destroys the specified HTTP
+                <code class="code"><em class="replaceable"><code>parser</code></em></code> and frees the
+                associated memory.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+                successfully.</p>
+<p><code class="code">INK_ERROR</code> if the operation does not
+                complete successfully.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrParseReq"></a>INKHttpHdrParseReq</h4></div></div></div>
+<p>Parses an HTTP request header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code"> int INKHttpHdrParseReq (INKHttpParser
+                <em class="replaceable"><code>parser</code></em>, INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, const char
+                **<em class="replaceable"><code>start</code></em>, const char
+                *<em class="replaceable"><code>end</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Parses an HTTP request header. The HTTP header
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> must already
+                be created, and must reside inside the marshal buffer
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>. The
+                <code class="code"><em class="replaceable"><code>start</code></em></code> argument points
+                to the current position of the string buffer being parsed and
+                the <code class="code"><em class="replaceable"><code>end</code></em></code> argument
+                points to one byte after the end of the buffer to be parsed.
+                On return, <code class="code"><em class="replaceable"><code>start</code></em></code> is
+                modified to point past the last character parsed.</p>
+<p>It is possible to parse an HTTP request header a single
+                byte at a time using repeated calls to
+                <code class="function">INKHttpHdrParseReq</code>. As long as an error
+                does not occur, the <code class="function">INKHttpHdrParseReq</code>
+                function will consume that single byte and ask for
+                more.</p>
+<p>Call after <code class="code">READ_REQUEST_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_PARSE_ERROR</code> is returned on
+                error.</p>
+<p><code class="code">INK_PARSE_DONE</code> is returned when a \r\n\r\n
+                pattern is encountered, indicating the end of the
+                header.</p>
+<p>INK_PARSE_CONT is returned if parsing of the header
+                stopped because the end of the buffer was reached.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHdrParseResp"></a>INKHttpHdrParseResp</h4></div></div></div>
+<p>Parses an HTTP response header.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">int INKHttpHdrParseResp (INKHttpParser
+                <em class="replaceable"><code>parser</code></em>, INKMBuffer
+                <em class="replaceable"><code>bufp</code></em>, INKMLoc
+                <em class="replaceable"><code>hdr_loc</code></em>, const char
+                **<em class="replaceable"><code>start</code></em>, const char
+                *<em class="replaceable"><code>end</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd>
+<p>Parses an HTTP response header. The HTTP header
+                <code class="code"><em class="replaceable"><code>hdr_loc</code></em></code> must already
+                be created, and must reside inside the marshal buffer
+                <code class="code"><em class="replaceable"><code>bufp</code></em></code>. The
+                <code class="code"><em class="replaceable"><code>start</code></em></code> argument points
+                to the current position of the string buffer being parsed and
+                the <code class="code"><em class="replaceable"><code>end</code></em></code> argument
+                points to one byte after the end of the buffer to be parsed.
+                On return, <code class="code"><em class="replaceable"><code>start</code></em></code> is
+                modified to point past the last character parsed.</p>
+<p>It is possible to parse an HTTP response header a single
+                byte at a time using repeated calls to
+                <code class="function">INKHttpHdrParseResp</code>. As long as an error
+                does not occur, the <code class="function">INKHttpHdrParseResp</code>
+                function will consume that single byte and ask for
+                more.</p>
+<p>Call after <code class="code">READ_RESPONSE_HDR_HOOK</code>, if it is
+                a transaction header.</p>
+</dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_PARSE_ERROR</code> is returned on
+                error.</p>
+<p><code class="code">INK_PARSE_DONE</code> is returned when a
+                <code class="code">\r\n\r\n</code> pattern is encountered, indicating the
+                end of the header.</p>
+<p><code class="code">INK_PARSE_CONT</code> is returned if parsing of
+                the header stopped because the end of the buffer was
+                reached</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaderFunctions.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,192 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter 10. HTTP Headers</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="Interface_ThreadFunctions.html" title="Thread Functions">
+<link rel="next" href="GuideTSHTTPHdrSyst.html" title="Guide to Traffic Server HTTP Header System">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="section" href="HTTPHeaders.html#AboutHTTPHeaders" title="About HTTP Headers">
+<link rel="section" href="GuideTSHTTPHdrSyst.html" title="Guide to Traffic Server HTTP Header System">
+<link rel="section" href="MarshalBuffers.html" title="Marshal Buffers">
+<link rel="section" href="HTTPHeaders2.html" title="HTTP Headers">
+<link rel="section" href="URLs.html" title="URLs">
+<link rel="section" href="MIMEHeaders.html" title="MIME Headers">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="Interface_ThreadFunctions.html">Prev</a> — Thread Functions</div>
+<div class="navnext">Guide to Traffic Server HTTP Header System — <a accesskey="n" href="GuideTSHTTPHdrSyst.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="HTTPHeaders"></a>Chapter 10. HTTP Headers</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="HTTPHeaders.html#AboutHTTPHeaders">About HTTP Headers</a></span></dt>
+<dt><span class="section"><a href="GuideTSHTTPHdrSyst.html">Guide to Traffic Server HTTP Header System</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="GuideTSHTTPHdrSyst.html#NoNullTerminatedStrings">No Null-Terminated Strings</a></span></dt>
+<dt><span class="section"><a href="DuplicateMIMEFlds.html">Duplicate MIME Fields Are Not Coalesced</a></span></dt>
+<dt><span class="section"><a href="MIMEFldsBelongAssocMIMEHdr.html">MIME Fields Always Belong to an Associated MIME
+        Header</a></span></dt>
+<dt><span class="section"><a href="RlsMarshalBufHandles.html">Release Marshal Buffer Handles</a></span></dt>
+<dt><span class="section"><a href="DeprecatedMarshBufFuncs.html">Deprecated Functions</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="MarshalBuffers.html">Marshal Buffers</a></span></dt>
+<dt><span class="section"><a href="HTTPHeaders2.html">HTTP Headers</a></span></dt>
+<dt><span class="section"><a href="URLs.html">URLs</a></span></dt>
+<dt><span class="section"><a href="MIMEHeaders.html">MIME Headers</a></span></dt>
+</dl>
+</div>
+<p>This chapter is about the functions used to manipulate HTTP
+    headers.</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="HTTPHeaders.html#AboutHTTPHeaders" title="About HTTP Headers">“About HTTP Headers”</a></p></li>
+<li><p><a href="GuideTSHTTPHdrSyst.html" title="Guide to Traffic Server HTTP Header System">“Guide to Traffic Server HTTP Header System”</a></p></li>
+<li><p><a href="MarshalBuffers.html" title="Marshal Buffers">“Marshal Buffers”</a></p></li>
+<li><p><a href="HTTPHeaders2.html" title="HTTP Headers">“HTTP Headers”</a></p></li>
+<li><p><a href="URLs.html" title="URLs">“URLs”</a></p></li>
+<li><p><a href="MIMEHeaders.html" title="MIME Headers">“MIME Headers”</a></p></li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="AboutHTTPHeaders"></a>About HTTP Headers</h2></div></div></div>
+<p>An HTTP message consists of:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>An HTTP headerm<a class="indexterm" name="id380485"></a></p></li>
+<li><p>body</p></li>
+<li><p>trailer</p></li>
+</ul></div>
+<p>The HTTP header consists of:</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<p>Request or response line</p>
+<div class="itemizedlist"><ul type="circle">
+<li><p>An HTTP request line is composed of a method, a URL and
+              version</p></li>
+<li><p>A response line is composed of a version, a status code
+              and a reason phrase</p></li>
+</ul></div>
+</li>
+<li><p>MIME header<a class="indexterm" name="id380540"></a></p></li>
+</ul></div>
+<p>A MIME header is made up of zero or more MIME fields. A MIME
+      field<a class="indexterm" name="id380553"></a> is composed of a field name, a colon and zero or more
+      field values. The values in a field are separated by commas.</p>
+<p>An HTTP header containing a request line is usually referred to as
+      a request. The following example shows a typical request header.</p>
+<pre class="programlisting">GET http://www.inktomi.com/ HTTP/1.0
+Proxy-Connection: Keep-Alive
+User-Agent: Mozilla/4.08 [en] (X11; I; Linux 2.2.3 i686)
+Host: www.inktomi.com
+Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */
+*
+
+Accept-Encoding: gzip
+Accept-Language: en
+Accept-Charset: iso-8859-1, *, utf-8</pre>
+<p>The response header for the above request might look like the
+      following:</p>
+<pre class="programlisting">HTTP/1.0 200 OK
+Date: Mon, 29 Mar 1999 06:57:43 GMT
+Content-Location: http://locutus.inktomi.com/index.html
+Etag: "07db14afa76be1:1074"
+Last-Modified: Thu, 25 Mar 1999 20:01:38 GMT
+Content-Length: 7931
+Content-Type: text/html
+Server: Microsoft-IIS/4.0
+Age: 922
+Proxy-Connection: close</pre>
+<p>The following figure illustrates an HTTP message, with the HTTP
+      header blown up:</p>
+<div class="figure">
+<a name="Fig_ReqRespHeaderStruc"></a><p class="title"><b>Figure 10.1. HTTP Request/Response and Header Structure</b></p>
+<div class="mediaobject"><img src="images/http_header_struct.jpg" alt="HTTP Request/Response and Header Structure"></div>
+</div>
+<p>The following figure gives examples of HTTP request and response
+      headers.</p>
+<div class="figure">
+<a name="Fig_HTTPReqRespHdrs"></a><p class="title"><b>Figure 10.2. Examples of HTTP Request and Response Headers</b></p>
+<div class="mediaobject"><img src="images/http_headers.jpg" alt="Examples of HTTP Request and Response Headers"></div>
+</div>
+<p>The marshal buffer or <code class="code">INKMBuffer</code> is a heap data
+      structure that stores parsed URLs, MIME headers and HTTP headers. You
+      can allocate new objects out of marshal buffers, and change the values
+      within the marshal buffer. Whenever you manipulate an object, you
+      require the handle to the object (<code class="code">INKMLoc</code>) and the marshal
+      buffer containing the object (<code class="function">INKMBuffer</code>).</p>
+<div class="figure">
+<a name="Fig_MarshalBufsHdrLocations"></a><p class="title"><b>Figure 10.3. Marshal Buffers and Header Locations</b></p>
+<div class="mediaobject"><img src="images/marshall_buffers.jpg" alt="Marshal Buffers and Header Locations"></div>
+</div>
+<p>Figure 19 shows:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>The marshal buffer containing the HTTP request,
+          <code class="code">reqest_bufp</code></p></li>
+<li><p><code class="function">INKMLoc</code> location pointer for the HTTP
+          header (<code class="code">http_hdr_loc</code>)</p></li>
+<li><p><code class="function">INKMLoc</code> location pointer for the request
+          URL (url_loc)</p></li>
+<li><p><code class="function">INKMLoc</code> location pointers for the MIME
+          header (<code class="code">mime_hdr_loc</code>)</p></li>
+<li><p><code class="function">INKMLoc</code> location pointers for MIME fields
+          (<code class="code">fieldi_loc</code>)</p></li>
+<li><p><code class="function">INKMLoc</code> location pointer for the next
+          duplicate MIME field (<code class="code">next_dup_loc</code>)</p></li>
+</ul></div>
+<p>The diagram also shows that an HTTP header contains pointers to
+      the URL location and the MIME header location. You can obtain the URL
+      location from an HTTP header using the function
+      <code class="function">INKHttpHdrUrlGet</code>. To work with MIME headers, you
+      can pass either a MIME header location or an HTTP header location to
+      MIME header functions . If you pass an HTTP header to a MIME header
+      function, the system locates the associated MIME header and executes the
+      MIME header function on the MIME header location.</p>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders2.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders2.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders2.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders2.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,269 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>HTTP Headers</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="prev" href="MarshalBuffers.html" title="Marshal Buffers">
+<link rel="next" href="URLs.html" title="URLs">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MarshalBuffers.html">Prev</a> — Marshal Buffers</div>
+<div class="navnext">URLs — <a accesskey="n" href="URLs.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="HTTPHeaders2"></a>HTTP Headers<a class="indexterm" name="id382144"></a></h2></div></div></div>
+<p>The Traffic Server API HTTP header functions enable you to work
+      with HTTP header data stored in marshal buffers.</p>
+<p>The HTTP header data structure is a parsed version of the HTTP
+      header defined in the HTTP protocol specification. An HTTP header is
+      composed of a request or response line followed by zero or more MIME
+      fields. In fact, an HTTP header is a subclass of a MIME header and all
+      of the MIME header routines operate on HTTP headers.</p>
+<p>An HTTP request line is composed of a method, a URL and version. A
+      response line is composed of a version, a status code and a reason
+      phrase. See <a href="HTTPHeaders.html#AboutHTTPHeaders" title="About HTTP Headers">“About HTTP Headers”</a> for details and examples
+      of HTTP headers.</p>
+<p>In order to facilitate fast comparisons and to reduce storage
+      size, Traffic Server defines several pre-allocated method names. These
+      names correspond to the methods defined in the HTTP 1.1
+      specification</p>
+<div class="informaltable"><table border="1">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td align="center"><span class="bold"><strong>Pre-Allocated Method
+              Names</strong></span></td>
+<td align="center"><span class="bold"><strong>HTTP 1.1
+              Method</strong></span></td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_CONNECT</td>
+<td>"CONNECT"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_DELETE</td>
+<td>"DELETE"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_GE</td>
+<td>"GET"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_HEAD</td>
+<td>"HEAD"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_ICP_QUERY</td>
+<td>"ICP_QUERY"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_OPTIONS</td>
+<td>"OPTIONS"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_POST</td>
+<td>"POST"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_PURGE</td>
+<td>"PURGE"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_PUT</td>
+<td>"PUT"</td>
+</tr>
+<tr>
+<td>INK_HTTP_METHOD_TRACE</td>
+<td>"TRACE"</td>
+</tr>
+</tbody>
+</table></div>
+<p>Traffic Server also defines several common values that appear in
+      HTTP headers.</p>
+<div class="informaltable"><table border="1">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td align="center"><span class="bold"><strong>Traffic Server
+              Definition</strong></span></td>
+<td align="center"><span class="bold"><strong>HTTP Header
+              Value</strong></span></td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_BYTES</td>
+<td>"bytes"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_CHUNKED</td>
+<td>"chunked"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_CLOSE</td>
+<td>"close"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_COMPRESS</td>
+<td>"compress"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_DEFLATE</td>
+<td>"deflate"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_GZIP</td>
+<td>"gzip"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_IDENTITY</td>
+<td>"identity"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_KEEP_ALIVE</td>
+<td>"keep-alive"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_MAX_AGE</td>
+<td>"max-age"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_MAX_STALE</td>
+<td>"max-stale"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_MIN_FRESH</td>
+<td>"min-fresh"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_MUST_REVALIDATE</td>
+<td>"must-revalidate"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_NONE</td>
+<td>"none"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_NO_CACHE</td>
+<td>"no-cache"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_NO_STORE</td>
+<td>"no-store"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_NO_TRANSFORM</td>
+<td>"no-transform"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_ONLY_IF_CACHED</td>
+<td>"only-if-cached"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_PRIVATE</td>
+<td>"private"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_PROXY_REVALIDATE</td>
+<td>"proxy-revalidate"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_PUBLIC</td>
+<td>"public"</td>
+</tr>
+<tr>
+<td>INK_HTTP_VALUE_S_MAX_AGE</td>
+<td>"s-maxage"</td>
+</tr>
+</tbody>
+</table></div>
+<p>The method names and header values above are defined in
+      <code class="filename">InkAPI.h</code> as <code class="code">const char* </code>strings. When
+      Traffic Server sets a method or a header value it makes a quick check to
+      see if the new value is one of the known values. If it is, instead of
+      storing the known value in the marshal buffer it stores a pointer into a
+      global table. The method names and header values listed above are also
+      pointers into this table. This allows simple pointer comparison of the
+      value returned from <code class="function">INKHttpMethodGet</code> with one of
+      the values listed above. It is also recommended that you use the above
+      values when referring to one of the known schemes as doing so removes
+      the possibility of a spelling error.</p>
+<p>The HTTP header functions are:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="function">INKHttpHdrClone</code></p></li>
+<li><p><code class="function">INKHttpHdrCopy</code></p></li>
+<li><p><code class="function">INKHttpHdrCreate</code></p></li>
+<li><p><code class="function">INKHttpHdrDestroy</code></p></li>
+<li><p><code class="function">INKHttpHdrLengthGet</code></p></li>
+<li><p><code class="function">INKHttpHdrMethodGet</code></p></li>
+<li><p><code class="function">INKHttpHdrMethodSet</code></p></li>
+<li><p><code class="function">INKHttpHdrPrint</code></p></li>
+<li><p><code class="function">INKHttpHdrReasonGet</code></p></li>
+<li><p><code class="function">INKHttpHdrReasonLookup</code></p></li>
+<li><p><code class="function">INKHttpHdrReasonSet</code></p></li>
+<li><p><code class="function">INKHttpHdrStatusGet</code></p></li>
+<li><p><code class="function">INKHttpHdrStatusSet</code></p></li>
+<li><p><code class="function">INKHttpHdrTypeGet</code></p></li>
+<li><p><code class="function">INKHttpHdrTypeSet</code></p></li>
+<li><p><code class="function">INKHttpHdrUrlGet</code></p></li>
+<li><p><code class="function">INKHttpHdrUrlSet</code></p></li>
+<li><p><code class="function">INKHttpHdrVersionGet</code></p></li>
+<li><p><code class="function">INKHttpHdrVersionSet</code></p></li>
+<li><p><code class="function">INKHttpParserClear</code></p></li>
+<li><p><code class="function">INKHttpParserCreate</code></p></li>
+<li><p><code class="function">INKHttpParserDestroy</code></p></li>
+<li><p><code class="function">INKHttpHdrParseReq</code></p></li>
+<li><p><code class="function">INKHttpHdrParseResp</code></p></li>
+</ul></div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/HTTPHeaders2.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPHooksAndTransactions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPHooksAndTransactions.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPHooksAndTransactions.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPHooksAndTransactions.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,130 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter 8. HTTP Hooks and Transactions</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="ch07s05.html" title="Cache Events">
+<link rel="next" href="AddingHooks.html" title="Adding Hooks">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="section" href="HTTPHooksAndTransactions.html#SetOfHooks" title="The Set of Hooks">
+<link rel="section" href="AddingHooks.html" title="Adding Hooks">
+<link rel="section" href="HTTPSessions.html" title="HTTP Sessions">
+<link rel="section" href="HTTP_Transactions.html" title="HTTP Transactions">
+<link rel="section" href="InterceptingHTTPTx.html" title="Intercepting HTTP Transactions">
+<link rel="section" href="InitiateHTTPConnection.html" title="Initiate HTTP Connection">
+<link rel="section" href="HTTPAlternateSelection.html" title="HTTP Alternate Selection">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="ch07s05.html">Prev</a> — Cache Events</div>
+<div class="navnext">Adding Hooks — <a accesskey="n" href="AddingHooks.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="HTTPHooksAndTransactions"></a>Chapter 8. HTTP Hooks and Transactions</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="HTTPHooksAndTransactions.html#SetOfHooks">The Set of Hooks</a></span></dt>
+<dt><span class="section"><a href="AddingHooks.html">Adding Hooks</a></span></dt>
+<dt><span class="section"><a href="HTTPSessions.html">HTTP Sessions</a></span></dt>
+<dt><span class="section"><a href="HTTP_Transactions.html">HTTP Transactions</a></span></dt>
+<dt><span class="section"><a href="InterceptingHTTPTx.html">Intercepting HTTP Transactions</a></span></dt>
+<dt><span class="section"><a href="InitiateHTTPConnection.html">Initiate HTTP Connection</a></span></dt>
+<dt><span class="section"><a href="HTTPAlternateSelection.html">HTTP Alternate Selection</a></span></dt>
+</dl>
+</div>
+<p>Hooks are points in Traffic Server transaction processing where
+    plugins can step in and do some work. Registering a plugin function for
+    callback amounts to “adding” the function to a hook. You can register your
+    plugin to be called back for every single transaction, or for specific
+    transactions only.</p>
+<p>This chapter contains the following sections:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="AddingHooks.html" title="Adding Hooks">“Adding Hooks”</a></p></li>
+<li><p><a href="HTTPSessions.html" title="HTTP Sessions">“HTTP Sessions”</a></p></li>
+<li><p><a href="HTTP_Transactions.html" title="HTTP Transactions">“HTTP Transactions”</a></p></li>
+<li><p><a href="InterceptingHTTPTransactionFuncs.html" title="Intercepting HTTP Transaction Functions">“Intercepting HTTP Transaction Functions”</a></p></li>
+<li><p><a href="InitiateHTTPConnection.html" title="Initiate HTTP Connection">“Initiate HTTP Connection”</a></p></li>
+<li><p><a href="HTTPAlternateSelection.html" title="HTTP Alternate Selection">“HTTP Alternate Selection”</a></p></li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="SetOfHooks"></a>The Set of Hooks</h2></div></div></div>
+<p>First you need the following terminology:</p>
+<div class="variablelist"><dl>
+<dt><span class="term">HTTP Transaction</span></dt>
+<dd>
+<p>A transaction consists of a single HTTP request from a
+            client and the response that Traffic Server sends to that client.
+            A transaction begins when Traffic Server receives a request, and
+            ends when Traffic Server sends the response.</p>
+<p>Traffic Server uses HTTP state machines to process
+            transactions. The state machines follow a complex set of states
+            involved in sophisticated caching and document retrieval (taking
+            into account, for example, alternate selection, freshness
+            criteria, and hierarchical caching). The Traffic Server API
+            provides hooks to a subset of these states, illustrated in <a href="HTTPHooksAndTransactions.html#Fig_HHTTPTxStateDiag" title="Figure 8.1. HTTP Transaction State Diagram">Figure 8.1, “HTTP Transaction State Diagram”</a>.</p>
+</dd>
+<dt><span class="term">transform hooks</span></dt>
+<dd><p>The two transform hooks,
+            <code class="code">INK_HTTP_REQUEST_TRANSFORM_HOOK</code> and
+            <code class="code">INK_HTTP_RESPONSE_TRANSFORM_HOOK</code> are called in the
+            course of an HTTP transform. To see where in the HTTP transaction
+            they are called, look for the “set up transform” ovals in <a href="HTTPHooksAndTransactions.html#Fig_HHTTPTxStateDiag" title="Figure 8.1. HTTP Transaction State Diagram">Figure 8.1, “HTTP Transaction State Diagram”</a>.</p></dd>
+<dt><span class="term">HTTP session</span></dt>
+<dd><p>A session consists of a single client connection to Traffic
+            Server. A session can consist of several transactions, in
+            succession. The session starts when the client connection opens,
+            and ends when the connection closes.</p></dd>
+</dl></div>
+<div class="figure">
+<a name="Fig_HHTTPTxStateDiag"></a><p class="title"><b>Figure 8.1. HTTP Transaction State Diagram</b></p>
+<div class="mediaobject"><img src="images/http_state2.jpg" alt="HTTP Transaction State Diagram"></div>
+</div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/HTTPHooksAndTransactions.html
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message