You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by di...@apache.org on 2010/03/26 20:14:51 UTC
svn commit: r928024 - in /incubator/trafficserver/site/trunk/docs/v2/sdk:
HTTPFunctions.html HTTPTransactionFunctions.html
Author: dianes
Date: Fri Mar 26 19:14:51 2010
New Revision: 928024
URL: http://svn.apache.org/viewvc?rev=928024&view=rev
Log:
added info for new APIs
Modified:
incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPFunctions.html
incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPTransactionFunctions.html
Modified: incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPFunctions.html?rev=928024&r1=928023&r2=928024&view=diff
==============================================================================
--- incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPFunctions.html (original)
+++ incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPFunctions.html Fri Mar 26 19:14:51 2010
@@ -55,6 +55,7 @@
</ul>
+<li><a href="HTTPTransactionFunctions.html#INKHttpTxnPristineUrlGet">INKHttpTxnPristineUrlGet</a></li>
<li><a href="HTTPTransactionFunctions.html#INKHttpTxnTransformedRespCache">INKHttpTxnTransformedRespCache</a></li>
<ul><li><a href="HTTPTransactionFunctions.html#INKHttpTxnTransformRespGet">INKHttpTxnTransformRespGet</a></li></ul>
Modified: incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPTransactionFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPTransactionFunctions.html?rev=928024&r1=928023&r2=928024&view=diff
==============================================================================
--- incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPTransactionFunctions.html (original)
+++ incubator/trafficserver/site/trunk/docs/v2/sdk/HTTPTransactionFunctions.html Fri Mar 26 19:14:51 2010
@@ -16,7 +16,9 @@
<ul>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnCacheLookupStatusGet">INKHttpTxnCacheLookupStatusGet</a></b></li>
-<ul><li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnCachedReqGet">INKHttpTxnCachedReqGet</a></b></li>
+<ul>
+ <li>INKHttpCacheLookupStatusSet</li>
+ <li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnCachedReqGet">INKHttpTxnCachedReqGet</a></b></li>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnCachedRespGet">INKHttpTxnCachedRespGet</a></b></li>
</ul>
@@ -33,12 +35,14 @@
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnHookAdd">INKHttpTxnHookAdd</a></b></li>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnNextHopIPGet">INKHttpTxnNextHopIPGet</a></b></li>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnParentProxyGet">INKHttpTxnParentProxyGet</a></b></li>
-<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnParentProxySet">INKHttpTxnParentProxySet</a></b></li>
-<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnReenable">INKHttpTxnReenable</a></b></li>
+<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnParentProxySet">INKHttpTxnParentProxySet</a></b></li>
+<li><a href="HTTPTransactionFunctions.html#INKHttpTxnPristineUrlGet"><b>INKHttpTxnPristineUrlGet</b></a></li>
+<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnParentProxySet">INKHttpTxnParentProxySet</a><a href="HTTPTransactionFunctions.html#INKHttpTxnReenable"></a></b></li>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnServerIPGet">INKHttpTxnServerIPGet</a></b></li>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnServerReqGet">INKHttpTxnServerReqGet</a></b></li>
-<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnServerRespGet">INKHttpTxnServerRespGet</a></b></li>
-<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnSsnGet">INKHttpTxnSsnGet</a></b></li>
+<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnServerRespGet">INKHttpTxnServerRespGet</a></b></li>
+<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnSkipRww">INKHttpTxnSkipRww</a></b></li>
+<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnSsnGet">INKHttpTxnSsnGet</a></b></li>
</ul>
<li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnTransformedRespCache">INKHttpTxnTransformedRespCache</a></b></li>
<ul><li><b><a href="HTTPTransactionFunctions.html#INKHttpTxnTransformRespGet">INKHttpTxnTransformRespGet</a></b></li>
@@ -101,6 +105,65 @@
</dl>
</div>
</div>
+
+
+<div class="section" lang="en">
+ <div class="titlepage"><div><div>
+ <h4 class="title">
+<a name="INKHttpTxnCacheLookupStatusGet"></a>INKHttpTxnCacheLookupStatusSet</h4></div></div></div>
+<p>Sets the cache lookup status to the status that is passed in.</p>
+<div class="variablelist"><dl>
+ <dt><span class="term"><b>Prototype</b></span></dt>
+ <dd>
+ <p><code class="code">int INKReturnCode INKHttpTxnCacheLookupStatusGet
+ (INKHttpTxn <em class="replaceable"><code>txnp</code></em>, int
+ *<em class="replaceable"><code>lookup_status</code></em>)</code></p></dd>
+ <dt><span class="term"><b>Arguments</b></span></dt>
+ <dd>
+ <p><code>INKHttpTxn <i>txnp </i></code> is the ongoing transaction.</p>
+ <p><code>int <i>*lookup_status </i></code> is set to the lookup status.</p>
+ </dd>
+ <dt><span class="term"><b>Description</b></span></dt>
+ <dd>
+ <p>Obtains the status of the current cache lookup for the
+ ongoing transaction
+ <code class="code"><em class="replaceable"><code>txnp </code></em></code> in the
+ <code class="code"><em class="replaceable"><code>lookup_status </code></em></code>
+ variable.</p>
+ <p>This function should only be called from
+ <code class="code">INK_HTTP_CACHE_LOOKUP_COMPLETE_HOOK</code>.</p>
+ <p>Possible status values returned in
+ <code class="code"><em class="replaceable"><code>lookup_status </code></em></code>
+ are:
+ </p><ul>
+ <li><code class="code">INK_CACHE_LOOKUP_MISS</code> - Document was not in
+ the cache, so it will be fetched from the origin server.</li>
+ <li><code class="code">INK_CACHE_LOOKUP_HIT_STALE</code> - Document was
+ present in the cache but was stale. A fresher version will be
+ fetched from the origin server (IMS request).</li>
+ <li><code class="code">INK_CACHE_LOOKUP_HIT_FRESH</code> - Document was
+ present in the cache and was fresh. Document will be served
+ from the cache.</li>
+ <li><code class="code">INK_CACHE_LOOKUP_SKIPPED</code> - Traffic Server
+ didn't perform a cache lookup because the request was not cacheable
+ (this can happen when the URL looks dynamic or the request is marked as noncacheable).</li>
+ </ul>
+ </dd>
+</dl>
+
+ <dl>
+ <dt><span class="term"><b>Returns</b></span></dt>
+ <dd>
+ <p><code class="code">INK_SUCCESS</code> if the API is called
+ successfully.</p>
+ <p><code class="code">INK_ERROR</code> if an error occurs while calling
+ the API or if an argument is invalid.</p>
+ </dd>
+ </dl>
+</div>
+</div>
+
+
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="INKHttpTxnCachedReqGet"></a>INKHttpTxnCachedReqGet</h4></div></div></div>
@@ -263,7 +326,7 @@
*</code><code class="code"><em class="replaceable"><code>port </code></em></code> is set to
the clientâs remote port value (port number used by the client
when creating a socket connection with the proxy for the
- transaction <code class="code"><em class="replaceable"><code>txnp</code></em></code>) in
+ transaction <code class="code"><em class="replaceable"><code>txnp </code></em></code>) in
network byte order.</p>
</dd>
<dt><span class="term"><b>Description</b></span></dt>
@@ -394,7 +457,7 @@
error body data is stored in the buffer
<code class="code"><em class="replaceable"><code>buf</code></em></code>. If the error body
is just plain text, then setting <code class="code"><em class="replaceable"><code>mimetype </code></em></code> to <code class="code">NULL</code>
- works fine. If the error body is HTML, then
+ is sufficient. If the error body is HTML, then
<code class="code"><em class="replaceable"><code>mimetype </code></em></code> should be
"<code class="code">text/html</code>". If the error body is a JPEG image,
then <code class="code"><em class="replaceable"><code>mimetype </code></em></code> should
@@ -411,7 +474,7 @@
<code class="code"><em class="replaceable"><code>buf </code></em></code> is allocated by
a call to <code class="function">INKmalloc</code>. Similarly, if you
want to set <code class="code"><em class="replaceable"><code>mimetype </code></em></code>
- to something other than <code class="code">NULL</code>, then make sure that
+ to something other than <code class="code">NULL</code>, then make sure
you allocate
<code class="code"><em class="replaceable"><code>mimetype </code></em></code> with a call
to <code class="function">INKmalloc</code>. Traffic Server
@@ -472,7 +535,7 @@
<dd>
<p>Returns the IP address of the next server from which
Traffic Server attempts to retrieve the requested document, in
- network byte order. This IP address could be the origin server
+ network byte order. The IP address returned could be the origin server
IP address or it could be the parent proxyâs IP
address.</p>
<p>Call after <code class="code">SEND_REQUEST_HDR_HOOK</code>.</p>
@@ -505,7 +568,7 @@
<code class="filename">parent.config</code> or <code class="filename">records.config</code> for the
<code><i>proxy.config.http.parent_proxies </i></code>parameter.</p>
<p>This function can be called from within any<code> </code>transaction hook.</p>
-<p>The <code class="code"><i>hostname </i></code> string returned must not be
+<p>The <code class="replaceable"><i>hostname </i></code> string returned must not be
deallocated.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
@@ -525,6 +588,7 @@
</dd>
</dl></div>
</div>
+
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="INKHttpTxnParentProxySet"></a>INKHttpTxnParentProxySet</h4></div></div></div>
@@ -551,6 +615,57 @@
</dd>
</dl></div>
</div>
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div>
+ <h4 class="title">
+<a name="INKHttpTxnPristineUrlGet"></a>INKHttpTxnPristineUrlGet</h4></div></div></div>
+<p>Gets the pristine URL (the URL that came in from the client request, before remap) for a specified HTTP transaction. </p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd>
+ <p><code>INKReturnCode INKHttpTxnPristineUrlGet (INKHttpTxn <span class="replaceable">txnp</span>, INKMBuffer *<span class="replaceable">bufp</span>, INKMLoc *<span class="replaceable">url_loc</span>);</code></p>
+</dd>
+<dt><span class="term"><b>Arguements</b></span></dt>
+<dd>
+ <p><code>INKHttpTxn <span class="replaceable">txnp </span></code> is the ongoing transaction.</p>
+ <p><code>INKMBuffer *<span class="replaceable">bufp </span></code> is the header buffer pointer</p>
+ <p><code>INKMLoc *<span class="replaceable">url_loc </span></code> is the pointer to the location where the pristine URL will be written.</p>
+</dd>
+</dl>
+ <dl>
+
+
+ <dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>After remap, the URL returned by <code>INKHttpHdrUrlGet</code> may not be the same as the original URL.
+ This API provides a way to access the URL that was part of the client request header. </p>
+ <p>Retrieves the pristine URL from the HTTP transaction <span class="replaceable">txnp</span>. <code>INKHttpTxnPristineUrlGet</code> stores the pristine URL in <span class="replaceable">bufp</span>, at
+ location <span class="replaceable">url_loc</span>. Call after <code>READ_REQUEST_HDR_HOOK</code>.</p>
+ <p>Release the returned <span class="replaceable">url_loc</span> with a call to <code>INKHandleMLocRelease</code>.</p>
+</dd>
+</dl>
+ <dl>
+
+ <dt><span class="term"><b>Returns</b></span></dt>
+ <dd>
+ <p><code>INK_SUCCESS</code> if the operation completes successfully.</p>
+
+ <p><code>INK_ERROR</code> if there is an error.</p></dd>
+
+
+ <dt><span class="term"><b>Example</b></span></dt>
+ <dd>
+ <p>if (INKHttpTxnPristineUrlGet(txnp, &bufp, &url_loc) == INK_SUCCESS)</p>
+ { value = INKUrlHostGet(bufp, url_loc, &len); INKDebug (DEBUG_TAG, "Pristine Host: %s", value); INKHandleMLocRelease (bufp, INK_NULL_MLOC, url_loc); }
+ <p> else { INKError ("INKHttpTxnPristineUrlGet returns 0.\n"); }</p>
+ </dd>
+ <dd>
+ </dd>
+ </dl>
+</div>
+</div>
+
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="INKHttpTxnReenable"></a>INKHttpTxnReenable</h4></div></div></div>
@@ -709,6 +824,32 @@
</dd>
</dl></div>
</div>
+
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div>
+ <h4 class="title">
+<a name="INKHttpTxnSkipRww"></a>INKHttpTxnSkipRww</h4></div></div></div>
+<p>Turns off read while writing for a transaction.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code>INKReturnCode INKHttpTxnSkipRww (INKHttpTxn <span class="replaceable">txnp</span>)</code></p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>((TBD: pending additional info from developer))</p>
+<p>((TBD: ts-259))</p>
+<p>((TBD))</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>INK_SUCCESS if successful.</p>
+<p>INK_ERROR if an error occurs.</p>
+</dd>
+</dl></div>
+</div>
+
+
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="INKHttpTxnSsnGet"></a>INKHttpTxnSsnGet</h4></div></div></div>