You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2010/11/06 07:31:10 UTC
svn commit: r778776 [20/21] - in
/websites/staging/trafficserver/trunk/content/docs/trunk: admin/ sdk/
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLFunctions.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLFunctions.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLFunctions.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLFunctions.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,745 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="HTTPHeaderFunctions">Prev</a> - HTTP Header Functions
+MIIME Headers - <a href="MimeHeadersFunctions">Next</a></p>
+<h3 id="url_functions">URL Functions</h3>
+<hr />
+<p><a href="URLFunctions#INKUrlClone">INKUrlClone</a>
+<a href="URLFunctions#INKUrlCopy">INKUrlCopy</a>
+<a href="URLFunctions#INKUrlCreate">INKUrlCreate</a>
+<a href="URLFunctions#INKUrlDestroy">INKUrlDestroy</a>
+<a href="URLFunctions#INKUrlPrint">INKUrlPrint</a>
+<a href="URLFunctions#INKUrlFtpTypeGet">INKUrlFtpTypeGet</a>
+<a href="URLFunctions#INKUrlFtpTypeSet">INKUrlFtpTypeSet</a>
+<a href="URLFunctions#INKUrlHostGet">INKUrlHostGet</a>
+<a href="URLFunctions#INKUrlHostSet">INKUrlHostSet</a>
+<a href="URLFunctions#INKUrlHttpFragmentGet">INKUrlHttpFragmentGet</a>
+<a href="URLFunctions#INKUrlHttpFragmentSet">INKUrlHttpFragmentSet</a>
+<a href="URLFunctions#INKUrlHttpParamsGet">INKUrlHttpParamsGet</a>
+<a href="URLFunctions#INKUrlHttpParamsSet">INKUrlHttpParamsSet</a>
+<a href="URLFunctions#INKUrlHttpQueryGet">INKUrlHttpQueryGet</a>
+<a href="URLFunctions#INKUrlHttpQuerySet">INKUrlHttpQuerySet</a>
+<a href="URLFunctions#INKUrlLengthGet">INKUrlLengthGet</a>
+<a href="URLFunctions#INKUrlParse">INKUrlParse</a>
+<a href="URLFunctions#INKUrlPasswordGet">INKUrlPasswordGet</a>
+<a href="URLFunctions#INKUrlPasswordSet">INKUrlPasswordSet</a>
+<a href="URLFunctions#INKUrlPathGet">INKUrlPathGet</a>
+<a href="URLFunctions#INKUrlPathSet">INKUrlPathSet</a>
+<a href="URLFunctions#INKUrlPortGet">INKUrlPortGet</a>
+<a href="URLFunctions#INKUrlPortSet">INKUrlPortSet</a>
+<a href="URLFunctions#INKUrlSchemeGet">INKUrlSchemeGet</a>
+<a href="URLFunctions#INKUrlSchemeSet">INKUrlSchemeSet</a>
+<a href="URLFunctions#INKUrlStringGet">INKUrlStringGet</a>
+<a href="URLFunctions#INKUrlUserGet">INKUrlUserGet</a>
+<a href="URLFunctions#INKUrlUserSet">INKUrlUserSet</a></p>
+<h4 id="inkurlclone">INKUrlClone</h4>
+<p>Copies a URL from a specified location in a source marshal buffer
+to a target marshal buffer.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKMLoc INKUrlClone (INKMBuffer <em class="replaceable"><code>dest_bufp</code>,
+ INKMBuffer <em><code>src_bufp</code></em>, INKMLoc <em><code>src_url_loc</code></em>)</p>
+<p><strong>Arguments</strong>
+ ~ <code><em class="replaceable"><code>src_bufp</code> and
+ <code><em class="replaceable"><code>dest_bufp</code> are the source and
+ destination marshal buffers.</p>
+<div class="codehilite"><pre><span class="sb">`<em class="replaceable"><code>src_url_loc`</span> <span class="n">is</span> <span class="n">the</span> <span class="n">source</span> <span class="n">URL</span>
+<span class="n">location</span> <span class="n">within</span> <span class="n">the</span> <span class="n">source</span> <span class="n">marshal</span> <span class="n">buffer</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Description</strong>
+ ~ Copies the contents of the URL at location
+ <code><em class="replaceable"><code>src_url_loc</code> within the marshal
+ buffer <code><em class="replaceable"><code>src_bufp</code> to a location
+ within the marshal buffer
+ <code><em class="replaceable"><code>dest_bufp</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+
+<span class="n">Release</span> <span class="n">the</span> <span class="n">returned</span> <span class="n">handle</span> <span class="n">with</span> <span class="n">a</span> <span class="n">call</span> <span class="n">to</span> <span class="sb">`INKHandleMLocRelease`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ The <code>INKMLoc</code> location of the copied URL.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR_PTR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlcopy">INKUrlCopy</h4>
+<p>Copies a URL from a specified location in a source marshal buffer
+to a specified location in a target marshal buffer.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlCopy (INKMBuffer <em class="replaceable"><code>dest_bufp</code>,
+ INKMLoc <em><code>dest_url_loc</code></em>, INKMBuffer <em><code>src_bufp</code></em>, INKMLoc
+ <em><code>src_url_loc</code></em>)</p>
+<p><strong>Arguments</strong>
+ ~ <code><em class="replaceable"><code>src_bufp</code> and
+ <code><em class="replaceable"><code>dest_bufp</code> are the source and
+ destination marshal buffers.</p>
+<div class="codehilite"><pre><span class="sb">`<em class="replaceable"><code>src_url_loc`</span> <span class="ow">and</span>
+<span class="sb">`<em class="replaceable"><code>dest_url_loc`</span> <span class="n">are</span> <span class="n">the</span> <span class="n">source</span> <span class="ow">and</span>
+<span class="n">destination</span> <span class="n">URL</span> <span class="n">locations</span> <span class="n">within</span> <span class="n">the</span> <span class="n">source</span> <span class="ow">and</span> <span class="n">destination</span> <span class="n">marshal</span>
+<span class="n">buffers</span><span class="o">.</span> <span class="n">The</span> <span class="n">type</span> <span class="sb">`INKMLoc`</span> <span class="n">is</span> <span class="n">used</span> <span class="k">for</span> <span class="n">marshal</span> <span class="n">buffer</span> <span class="n">locations</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Description</strong>
+ ~ Copies the contents of the URL at location
+ <code><em class="replaceable"><code> src_url_loc</code> within the marshal
+ buffer <code><em class="replaceable"><code>src_bufp</code> to the location
+ <code><em class="replaceable"><code>dest_url_loc</code> within the marshal
+ buffer <code><em class="replaceable"><code>dest_bufp</code>.</p>
+<p>~ <code>INKUrlCopy</code> works correctly even if
+ <code><em class="replaceable"><code> src_bufp</code> and
+ <code><em class="replaceable"><code> dest_bufp</code> point to different
+ marshal buffers. It is important to create the destination URL (its
+ marshal buffer and <code>INKMLoc</code>) before you copy into it.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlcreate">INKUrlCreate</h4>
+<p>Creates a new URL in a marshal buffer.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKMLoc INKUrlCreate (INKMBuffer <em class="replaceable"><code>bufp</code>)</p>
+<p><strong>Description</strong>
+ ~ Creates a new URL within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>. Release the resulting handle
+ with a call to <code>INKHandleMLocRelease</code> and destroy the URL with a
+ call to <code>INKUrlDestroy</code>. Note that if you destroy the URL, then you
+ must also release the handle.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ A location handle for the URL within the marshal buffer.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR_PTR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurldestroy">INKUrlDestroy</h4>
+<p>Destroys a specific URL within a marshal buffer.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlDestroy (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Destroys the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+
+<span class="o">!</span><span class="p">[[</span><span class="n">Caution</span><span class="p">]](</span><span class="n">images</span><span class="sr">/docbook/c</span><span class="n">aution</span><span class="o">.</span><span class="n">png</span><span class="p">)</span>
+<span class="n">Caution</span>
+<span class="n">Don</span><span class="err">'</span><span class="n">t</span> <span class="n">forget</span> <span class="n">to</span> <span class="n">release</span> <span class="n">the</span> <span class="n">handle</span>
+<span class="sb">`<em class="replaceable"><code> url_loc`</span> <span class="n">with</span> <span class="n">a</span> <span class="n">call</span> <span class="n">to</span>
+<span class="sb">`INKHandleMLocRelease`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlprint">INKUrlPrint</h4>
+<p>Formats a URL stored in a marshal buffer to an <code>INKIOBuffer</code>.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlPrint (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, INKIOBuffer <em><code>iobufp</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Formats a URL stored in an <code>INKMBuffer</code> to an <code>INKIOBuffer</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlftptypeget">INKUrlFtpTypeGet</h4>
+<p>Gets the FTP type of a specific URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>int INKUrlFtpTypeGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Retrieves the FTP type portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ Returns <code>65</code> if the FTP type is ASCII.</p>
+<div class="codehilite"><pre><span class="n">Returns</span> <span class="sb">`73`</span> <span class="k">if</span> <span class="n">the</span> <span class="n">FTP</span> <span class="n">type</span> <span class="n">is</span> <span class="n">binary</span><span class="o">.</span>
+
+<span class="sb">`INK_ERROR_PTR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlftptypeset">INKUrlFtpTypeSet</h4>
+<p>Sets the FTP type of a specific URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlFtpTypeSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, int <em><code>type</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the FTP type portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the value
+ <code><em class="replaceable"><code>type</code>. Valid values for the
+ <code><em class="replaceable"><code>type</code> argument
+ are:<code>0</code>,<code>65('A')</code>,<code>97('a')</code>,<code>69('E')</code>,<code>101('e')</code>,<code>73 ('I')</code>,
+ and <code>105('i')</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlhostget">INKUrlHostGet</h4>
+<p>Gets the host portion of a specific URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlHostGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the host portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. The length of the returned
+string is placed in the <code><em class="replaceable"><code>length</code>
+argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the host portion of the specified URL. Release with a
+call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlhostset">INKUrlHostSet</h4>
+<p>Sets the host portion of a URL to a specific value.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlHostSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the host portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code>*<code>`* is</code>-1<code>, then</code>INKUrlHostSet<code>assumes that value is null-terminated. Otherwise,
+ the length of the string</code><em class="replaceable"><code>value<code>is
+ taken to be</code><em class="replaceable"><code>length`.</p>
+<p>~ The string is copied to within
+ <code><em class="replaceable"><code>bufp</code>, so it's okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlHostSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlhttpfragmentget">INKUrlHttpFragmentGet</h4>
+<p>Gets a specified HTTP fragment of a URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlHttpFragmentGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the HTTP fragment portion of the URL located at
+<code><em class="replaceable"><code> url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlHttpFragmentGet</code>
+places the length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the HTTP fragment portion of the specified URL.
+Release with a call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlhttpfragmentset">INKUrlHttpFragmentSet</h4>
+<p>Sets a specified HTTP fragment within a URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlHttpFragmentSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the HTTP fragment portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlHttpFragmentSet</code> assumes that value is null-terminated.
+ Otherwise, the length of the string
+ <code><em class="replaceable"><code>value</code> is taken to be
+ <code><em class="replaceable"><code>length</code>.</p>
+<p>~ The string is copied to within
+ <code><em class="replaceable"><code>bufp</code>, so it's okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlHttpFragmentSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlhttpparamsget">INKUrlHttpParamsGet</h4>
+<p>Gets the HTTP params portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlHttpParamsGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the HTTP params portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlHttpParamsGet</code> places
+the length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the HTTP params portion of the specified URL. Release
+with a call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlhttpparamsset">INKUrlHttpParamsSet</h4>
+<p>Sets the HTTP params portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlHttpParamsSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the HTTP params portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlHttpParamsSet</code> assumes that value is null-terminated.
+ Otherwise, the length of the string
+ <code><em class="replaceable"><code>value</code> is taken to be
+ <code><em class="replaceable"><code>length</code>.</p>
+<p>~ <code>INKUrlHttpParamsSet</code> copies the string to within
+ <code><em class="replaceable"><code>bufp</code>, so it's okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlHttpParamsSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlhttpqueryget">INKUrlHttpQueryGet</h4>
+<p>Gets the HTTP query portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlHttpQueryGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the HTTP query portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code>within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlHttpQueryGet</code> places
+the length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the HTTP query portion of the specified URL. Release
+with a call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlhttpqueryset">INKUrlHttpQuerySet</h4>
+<p>Sets the HTTP query portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlHttpQuerySet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the HTTP query portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlHttpQuerySet</code> assumes that value is null-terminated.
+ Otherwise, the length of the string
+ <code><em class="replaceable"><code>value</code> is taken to be
+ <code><em class="replaceable"><code>length</code>.</p>
+<p>~ <code>INKUrlHttpQuerySet</code> copies the string to within
+ <code><em class="replaceable"><code>bufp</code>, so it's okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlHttpQuerySet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurllengthget">INKUrlLengthGet</h4>
+<p>Calculates the length of a URL's string representation.</p>
+<p><strong>Prototype</strong>
+ ~ <code>int INKUrlLengthGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Calculates the length of URL located at
+ <code><em class="replaceable"><code> url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>, if it was returned as a
+ string. This length is the same as the length returned by
+ <code>INKUrlStringGet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ Returns the calculated length.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlparse">INKUrlParse</h4>
+<p>Parses the specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>int INKUrlParse (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char **<em><code>start</code></em>, const char
+ *<em><code>end</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Parses a URL. The <code><em class="replaceable"><code>start</code> pointer
+ is both an input and an output parameter, and marks the start of
+ the URL to be parsed. After a successful parse, the
+ <code><em class="replaceable"><code>start</code> pointer equals the
+ <code><em class="replaceable"><code> end</code> pointer.</p>
+<p>~ The <code><em class="replaceable"><code>end</code> pointer must be one
+ byte after the last character you want to parse.The URL parsing
+ routine assumes that everything between
+ <code><em class="replaceable"><code>start</code> and
+ <code><em class="replaceable"><code>end</code> is part of the URL. It is up to
+ higher-level parsing routines, such as <code>INKHttpHdrParseReq</code>, to
+ determine the actual end of the URL.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_PARSE_DONE</code> if successful.</p>
+<p>~ <code>INK_PARSE_ERROR</code> if an error occurs.</p>
+<h4 id="inkurlpasswordget">INKUrlPasswordGet</h4>
+<p>Gets the password portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlPasswordGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the password portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlPasswordGet</code> places
+the length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the password portion of the specified URL. Release
+with a call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlpasswordset">INKUrlPasswordSet</h4>
+<p>Sets the password portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlPasswordSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the password portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlPasswordSet</code> assumes that value is null-terminated.
+ Otherwise, the length of the string
+ <code><em class="replaceable"><code>value</code> is taken to be
+ <code><em class="replaceable"><code>length</code>.</p>
+<p>~ <code>INKUrlPasswordSet</code> copies the string to within
+ <code><em class="replaceable"><code>bufp</code>, so it is okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlPasswordSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlpathget">INKUrlPathGet</h4>
+<p>Gets the path portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlPathGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the path portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlPathGet</code> places the
+length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the path portion of the specified URL. Release with a
+call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated. If the
+URL contains a query portion, then it is not included in the
+response (see <a href="#INKUrlHttpQueryGet"><code>INKUrlHttpQueryGet</code>)</a>.</p>
+<h4 id="inkurlpathset">INKUrlPathSet</h4>
+<p>Sets the path portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlPathSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the path portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlPathSet</code> assumes that value is null-terminated. Otherwise,
+ the length of the string <code><em class="replaceable"><code>value</code> is
+ taken to be <code><em class="replaceable"><code>length</code>.</p>
+<p>~ <code>INKUrlPathSet</code> copies the string to within
+ <code><em class="replaceable"><code>bufp</code>, so it is okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlPathSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlportget">INKUrlPortGet</h4>
+<p>Gets the port number portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>int INKUrlPortGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Retrieves the port number portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ The port number portion of the specified URL.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlportset">INKUrlPortSet</h4>
+<p>Sets the port number portion of a URL to a specified value.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlPortSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, int <em><code>port</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the port number portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the value
+ <code><em class="replaceable"><code> port</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlschemeget">INKUrlSchemeGet</h4>
+<p>Gets the scheme portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlSchemeGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the scheme portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlSchemeGet</code> places the
+length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the scheme portion of the specified URL. Release with
+a call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurlschemeset">INKUrlSchemeSet</h4>
+<p>Sets the scheme portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlSchemeSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the scheme portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>~ If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+ <code>INKUrlSchemeSet</code> assumes that value is null-terminated. Otherwise,
+ the length of the string <code><em class="replaceable"><code>value</code> is
+ taken to be <code><em class="replaceable"><code>length</code>.
+ <code>INKUrlSchemeSet</code> copies the string to within
+ <code><em class="replaceable"><code>bufp</code>, so it's okay to modify or
+ delete <code><em class="replaceable"><code>value</code> after calling
+ <code>INKUrlSchemeSet</code>.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if successful.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurlstringget">INKUrlStringGet</h4>
+<p>Constructs a string representation of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>.</p>
+<p><strong>Prototype</strong>
+ ~ <code>char* INKUrlStringGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Constructs a string representation of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code>.</p>
+<p>~ <code>INKUrlStringGet</code> stores the length of the allocated string in
+ the parameter <code><em class="replaceable"><code>length</code> (this is the
+ same <code><em class="replaceable"><code>length</code> that <code>INKUrlLengthGet</code>
+ returns).</p>
+<p>~ The returned string is allocated by a call to <code>INKmalloc</code>; it
+ should be freed by a call to <code>INKfree</code>. If
+ <code><em class="replaceable"><code>length</code> is <code>NULL</code>, then no attempt
+ is made to dereference it.</p>
+<div class="codehilite"><pre><span class="n">If</span> <span class="n">it</span> <span class="n">is</span> <span class="n">in</span> <span class="n">a</span> <span class="n">transaction</span> <span class="n">header</span><span class="p">,</span> <span class="k">then</span> <span class="n">call</span> <span class="n">after</span>
+<span class="sb">`READ_REQUEST_HDR_HOOK`</span><span class="o">.</span>
+</pre></div>
+
+
+<p><strong>Returns</strong>
+ ~ A null-terminated string.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR_PTR`</span> <span class="k">if</span> <span class="n">there</span> <span class="n">is</span> <span class="n">an</span> <span class="n">error</span><span class="o">.</span>
+</pre></div>
+
+
+<h4 id="inkurluserget">INKUrlUserGet</h4>
+<p>Gets the user portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+<code>const char* INKUrlUserGet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+INKMLoc <em><code>url_loc</code></em>, int *<em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+Retrieves the user portion of the URL located at
+<code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+<code><em class="replaceable"><code>bufp</code>. <code>INKUrlUserGet</code> places the
+length of the returned string in the
+<code><em class="replaceable"><code>length</code> argument.</p>
+<p>If in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+A pointer to the user portion of the specified URL. Release with a
+call to <code>INKHandleStringRelease</code>.</p>
+<p><code>INK_ERROR_PTR</code> if an error occurs.</p>
+<p><img alt="[Note]" src="images/docbook/note.png" />
+Note
+The returned string is not guaranteed to be null-terminated.</p>
+<h4 id="inkurluserset">INKUrlUserSet</h4>
+<p>Sets the user portion of a specified URL.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKUrlUserSet (INKMBuffer <em class="replaceable"><code>bufp</code>,
+ INKMLoc <em><code>url_loc</code></em>, const char *<em><code>value</code></em>, int <em><code>length</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Sets the user portion of the URL located at
+ <code><em class="replaceable"><code>url_loc</code> within the marshal buffer
+ <code><em class="replaceable"><code>bufp</code> to the string
+ <code><em class="replaceable"><code>value</code>.</p>
+<p>If <code><em class="replaceable"><code>length</code> is <code>-1</code>, then
+<code>INKUrlUserSet</code> assumes that value is null-terminated. Otherwise,
+the length of the string <code><em class="replaceable"><code>value</code> is
+taken to be <code><em class="replaceable"><code>length</code>.</p>
+<p><code>INKUrlUserSet</code> copies the string to within
+<code><em class="replaceable"><code>bufp</code>, so it is okay to modify or
+delete <code><em class="replaceable"><code>value</code> after calling
+<code>INKUrlUserSet</code>.</p>
+<p>If it is in a transaction header, then call after
+<code>READ_REQUEST_HDR_HOOK</code>.</p>
+<p><strong>Returns</strong>
+<code>INK_SUCCESS</code> if successful.</p>
+<p><code>INK_ERROR</code> if an error occurs.</p>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLs.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLs.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLs.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/URLs.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,124 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="HTTPHeaders2">Prev</a> - HTTP Headers
+MIME Headers - <a href="MIMEHeaders">Next</a></p>
+<h2 id="urls">URLs</h2>
+<p>API URL functions provide access to URL data stored in marshal
+buffers. The URL functions can create, copy, retrieve or delete
+entire URLs; they can also retrieve or modify parts of URLs, such
+as port or scheme information.</p>
+<p>The general form of an Internet URL is:</p>
+<div class="codehilite"><pre><span class="n">scheme:</span><span class="sr">//</span><span class="n">user:password</span><span class="nv">@host:port</span><span class="o">/</span><span class="n">stuff</span>
+</pre></div>
+
+
+<p>The URL data structure includes support for two specific types of
+internet URLs. HTTP URLs have the form:</p>
+<div class="codehilite"><pre><span class="n">http:</span><span class="sr">//</span><span class="n">user:password</span><span class="nv">@host:port</span><span class="o">/</span><span class="n">path</span><span class="p">;</span><span class="n">params</span><span class="p">?</span><span class="n">query</span><span class="c1">#fragment</span>
+</pre></div>
+
+
+<p>FTP URLs have the form:</p>
+<div class="codehilite"><pre><span class="n">ftp:</span><span class="sr">//</span><span class="n">user:password</span><span class="nv">@host:port</span><span class="o">/</span><span class="n">path</span><span class="p">;</span><span class="n">type</span><span class="o">=</span><span class="n">val</span>
+</pre></div>
+
+
+<p>The URL port and FTP type are stored as integers. All remaining
+parts of the URL (scheme, user, etc.) are stored as strings.
+Traffic Server URL functions are named according to the portion of
+the URL on which they operate. For instance, the function that
+retrieves the host portion of a URL is named <code>INKUrlHostGet</code>.</p>
+<p>To facilitate fast comparisons and reduce storage size, Traffic
+Server defines several preallocated scheme names.</p>
+<p><strong>Traffic Server Definition</strong>
+<strong>Pre-Allocated Scheme Name</strong>
+<strong>URL Scheme String Lengths</strong>
+<code>INK_URL_SCHEME_FILE</code>
+"file"
+<code>INK_URL_LEN_FILE</code>
+<code>INK_URL_SCHEME_FTP</code>
+"ftp"
+<code>INK_URL_LEN_FTP</code>
+<code>INK_URL_SCHEME_GOPHER</code>
+"gopher"
+<code>INK_URL_LEN_GOPHER</code>
+<code>INK_URL_SCHEME_HTTP</code>
+"http"
+<code>INK_URL_LEN_HTTP</code>
+<code>INK_URL_SCHEME_HTTPS</code>
+"https"
+<code>INK_URL_LEN_HTTPS</code>
+<code>INK_URL_SCHEME_MAILTO</code>
+"mailto"
+<code>INK_URL_LEN_MAILTO</code>
+<code>INK_URL_SCHEME_NEWS</code>
+"news"
+<code>INK_URL_LEN_NEWS</code>
+<code>INK_URL_SCHEME_NNTP</code>
+"nntp"
+<code>INK_URL_LEN_NNTP</code>
+<code>INK_URL_SCHEME_PROSPERO</code>
+"prospero"
+<code>INK_URL_LEN_PROSPERO</code>
+<code>INK_URL_SCHEME_TELNET</code>
+"telnet"
+<code>INK_URL_LEN_TELNET</code>
+<code>INK_URL_SCHEME_WAIS</code>
+"wais"
+<code>INK_URL_LEN_WAIS</code>
+The scheme names above are defined in <code>ts.h</code> as <code>const</code> <code>char*</code>
+strings. When Traffic Server sets the scheme portion of the URL (or
+any portion for that matter), it quickly checks to see if the new
+value is one of the known values. If it is, then it stores a
+pointer into a global table (instead of storing the known value in
+the marshal buffer). The scheme values listed above are also
+pointers into this table. This allows simple pointer comparison of
+the value returned from <code>INKUrlSchemeGet</code> with one of the values
+listed above. You should use the Traffic Server-defined values when
+referring to one of the known schemes, since doing so can prevent
+the possibility of spelling errors.</p>
+<p>Traffic Server <strong>URL functions</strong> are listed below:</p>
+<hr />
+<p><a href="URLFunctions#INKUrlClone">INKUrlClone</a>
+<a href="URLFunctions#INKUrlCopy">INKUrlCopy</a>
+<a href="URLFunctions#INKUrlCreate">INKUrlCreate</a>
+<a href="URLFunctions#INKUrlDestroy">INKUrlDestroy</a>
+<a href="URLFunctions#INKUrlPrint">INKUrlPrint</a>
+<a href="URLFunctions#INKUrlFtpTypeGet">INKUrlFtpTypeGet</a>
+<a href="URLFunctions#INKUrlFtpTypeSet">INKUrlFtpTypeSet</a>
+<a href="URLFunctions#INKUrlHostGet">INKUrlHostGet</a>
+<a href="URLFunctions#INKUrlHostSet">INKUrlHostSet</a>
+<a href="URLFunctions#INKUrlHttpFragmentGet">INKUrlHttpFragmentGet</a>
+<a href="URLFunctions#INKUrlHttpFragmentSet">INKUrlHttpFragmentSet</a>
+<a href="URLFunctions#INKUrlHttpParamsGet">INKUrlHttpParamsGet</a>
+<a href="URLFunctions#INKUrlHttpParamsSet">INKUrlHttpParamsSet</a>
+<a href="URLFunctions#INKUrlHttpQueryGet">INKUrlHttpQueryGet</a>
+<a href="URLFunctions#INKUrlHttpQuerySet">INKUrlHttpQuerySet</a>
+<a href="URLFunctions#INKUrlLengthGet">INKUrlLengthGet</a>
+<a href="URLFunctions#INKUrlParse">INKUrlParse</a>
+<a href="URLFunctions#INKUrlPasswordGet">INKUrlPasswordGet</a>
+<a href="URLFunctions#INKUrlPasswordSet">INKUrlPasswordSet</a>
+<a href="URLFunctions#INKUrlPathGet">INKUrlPathGet</a>
+<a href="URLFunctions#INKUrlPathSet">INKUrlPathSet</a>
+<a href="URLFunctions#INKUrlPortGet">INKUrlPortGet</a>
+<a href="URLFunctions#INKUrlPortSet">INKUrlPortSet</a>
+<a href="URLFunctions#INKUrlSchemeGet">INKUrlSchemeGet</a>
+<a href="URLFunctions#INKUrlSchemeSet">INKUrlSchemeSet</a>
+<a href="URLFunctions#INKUrlStringGet">INKUrlStringGet</a>
+<a href="URLFunctions#INKUrlUserGet">INKUrlUserGet</a>
+<a href="URLFunctions#INKUrlUserSet">INKUrlUserSet</a></p>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/Updatingplugin.configFile.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/Updatingplugin.configFile.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/Updatingplugin.configFile.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/Updatingplugin.configFile.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,34 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="ASimplePlugin">Prev</a> - A Simple Plugin
+Specify the Plugin's Location -
+<a href="SpecifyingPluginLocation">Next</a></p>
+<h3 id="update_the_pluginconfig_file">Update the <code>plugin.config</code> File</h3>
+<p>Your next step is to tell Traffic Server about the plugin by adding
+the following line to the <code>plugin.config</code> file. Since our simple
+plugin does not require any arguments, the following
+<code>plugin.config</code> will work:</p>
+<div class="codehilite"><pre><span class="c1"># a simple plugin.config for hello-world</span>
+<span class="n">hello</span><span class="o">-</span><span class="n">world</span><span class="o">.</span><span class="n">so</span>
+</pre></div>
+
+
+<p>Traffic Server can accommodate multiple plugins. If several plugin
+functions are triggered by the same event, then Traffic Server
+invokes each plugin's function in the order each was defined in the
+<code>plugin.config</code> file.</p>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOFunctions.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOFunctions.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOFunctions.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOFunctions.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,45 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="INKTransformOutputVConnGet">Prev</a> -
+INKTransformOutputVConnGet
+INKVIOContGet - <a href="INKVIOContGet">Next</a></p>
+<h2 id="vio_functions">VIO Functions</h2>
+<hr />
+<p><a href="VIOFunctions#INKVIOBufferGet">INKVIOBufferGet</a>
+<a href="INKVIOContGet">INKVIOContGet</a>
+<a href="INKVIOMutexGet">INKVIOMutexGet</a>
+<a href="INKVIONBytesGet">INKVIONBytesGet</a>
+<a href="INKVIONBytesSet">INKVIONBytesSet</a>
+<a href="INKVIONDoneGet">INKVIONDoneGet</a>
+<a href="INKVIONDoneSet">INKVIONDoneSet</a>
+<a href="INKVIONTodoGet">INKVIONTodoGet</a>
+<a href="INKVIOReaderGet">INKVIOReaderGet</a>
+<a href="INKVIOReenable">INKVIOReenable</a>
+<a href="INKVIOVConnGet">INKVIOVConnGet</a></p>
+<h3 id="inkviobufferget">INKVIOBufferGet</h3>
+<p>Gets a VIO buffer.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKIOBuffer INKVIOBufferGet (INKVIO <em class="replaceable"><code>viop</code>)</p>
+<p><strong>Description</strong>
+ ~ Gets the buffer for the IO operation described by
+ <code><i>viop</i></code>. <code>INKVIOBufferGet</code> is used by vconnections performing
+ read operations (i.e., read operations write into their buffers).</p>
+<p><strong>Returns</strong>
+ ~ The buffer for the specified IO operation.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR_PTR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOs_IO.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOs_IO.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOs_IO.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VIOs_IO.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,55 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="Transformations_IO">Prev</a> - Transformations
+IO Buffers - <a href="IOBuffers_IO">Next</a></p>
+<h2 id="vios">VIOs</h2>
+<p>A <strong>VIO</strong>, or <strong>virtual IO</strong>, is a description of an IO operation
+that's currently in progress. The VIO data structure is used by
+vconnection users to determine how much progress has been made on a
+particular IO operation and to re-enable an IO operation when it
+stalls due to buffer space issues. VIOs are used by vconnection
+implementors to determine the buffer for an IO operation, how much
+work to do on the IO operation, and which continuation to call back
+when progress on the IO operation is made.</p>
+<p>The <code>INKVIO</code> data structure itself is opaque, but it could be
+defined as follows:</p>
+<div class="codehilite"><pre><span class="n">typedef</span> <span class="n">struct</span> <span class="p">{</span>
+ <span class="n">INKCont</span> <span class="n">continuation</span><span class="p">;</span>
+ <span class="n">INKVConn</span> <span class="n">vconnection</span><span class="p">;</span>
+ <span class="n">INKIOBufferReader</span> <span class="n">reader</span><span class="p">;</span>
+ <span class="n">INKMutex</span> <span class="n">mutex</span><span class="p">;</span>
+ <span class="nb">int</span> <span class="n">nbytes</span><span class="p">;</span>
+ <span class="nb">int</span> <span class="n">ndone</span><span class="p">;</span>
+<span class="p">}</span> <span class="o">*</span><span class="n">INKVIO</span><span class="p">;</span>
+</pre></div>
+
+
+<p>The VIO functions below access and modify various parts of the data
+structure.</p>
+<hr />
+<p><a href="VIOFunctions#INKVIOBufferGet">INKVIOBufferGet</a>
+<a href="INKVIOVConnGet">INKVIOVConnGet</a>
+<a href="INKVIOContGet">INKVIOContGet</a>
+<a href="INKVIOMutexGet">INKVIOMutexGet</a>
+<a href="INKVIONBytesGet">INKVIONBytesGet</a>
+<a href="INKVIONBytesSet">INKVIONBytesSet</a>
+<a href="INKVIONDoneGet">INKVIONDoneGet</a>
+<a href="INKVIONDoneSet">INKVIONDoneSet</a>
+<a href="INKVIONTodoGet">INKVIONTodoGet</a>
+<a href="INKVIOReaderGet">INKVIOReaderGet</a>
+<a href="INKVIOReenable">INKVIOReenable</a></p>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VconnectionFunctions.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VconnectionFunctions.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VconnectionFunctions.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/VconnectionFunctions.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,51 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="INKHostLookupResultIPGet">Prev</a> - INKHostLookupResultIPGet
+INKVConnClose - <a href="INKVConnClose">Next</a></p>
+<h2 id="vconnection_functions">Vconnection Functions</h2>
+<hr />
+<p><a href="VconnectionFunctions#INKVConnAbort">INKVConnAbort</a>
+<a href="INKVConnClose">INKVConnClose</a>
+<a href="INKVConnClosedGet">INKVConnClosedGet</a>
+<a href="INKVConnRead">INKVConnRead</a>
+<a href="INKVConnReadVIOGet">INKVConnReadVIOGet</a>
+<a href="INKVConnShutdown">INKVConnShutdown</a>
+<a href="INKVConnWrite">INKVConnWrite</a>
+<a href="INKVConnWriteVIOGet">INKVConnWriteVIOGet</a></p>
+<h3 id="inkvconnabort">INKVConnAbort</h3>
+<p>Closes a vconnection and specifies that operations being performing
+were aborted.</p>
+<p><strong>Prototype</strong>
+ ~ <code>INKReturnCode INKVConnAbort (INKVConn <em class="replaceable"><code>connp</code>,
+ int <em><code>error</code></em>)</p>
+<p><strong>Description</strong>
+ ~ Closes the vconnection <code><em class="replaceable"><code>connp</code>
+ and specifies that the operations it was performing were aborted.
+ The vconnection will be deallocated at some point in the near
+ future, after <code>INKVConnAbort</code> is called. After calling
+ <code>INKVConnClose</code>, a user will not receive any more events from
+ <code><em class="replaceable"><code>connp</code>. For most vconnections,
+ <code>INKVConnClose</code> and <code>INKVConnAbort</code> perform identical operations; a
+ potential difference is that when a vconnection is aborted, the
+ vconnection implementor can decide to do something special. For
+ example, a vconnection writing a file to disk might decide to
+ delete the file.</p>
+<p><strong>Returns</strong>
+ ~ <code>INK_SUCCESS</code> if the connection is successfully aborted.</p>
+<div class="codehilite"><pre><span class="sb">`INK_ERROR`</span> <span class="k">if</span> <span class="n">an</span> <span class="n">error</span> <span class="n">occurs</span><span class="o">.</span>
+</pre></div>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/ViewStatsUsingTrafLine.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/ViewStatsUsingTrafLine.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/ViewStatsUsingTrafLine.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/ViewStatsUsingTrafLine.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,36 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="CoupledStatistics">Prev</a> - Coupled Statistics
+Chapter 18. Function Reference - <a href="FunctionReference">Next</a></p>
+<h2 id="viewing_statistics_using_traffic_line">Viewing Statistics Using Traffic Line</h2>
+<p>To view statistics for your plugin, follow the steps below:</p>
+<ol>
+<li>
+<p>Make sure you know the name of your statistic (i.e., the name
+ used in the <code>INKStatCoupledGlobalAdd</code>, <code>INKStatCreate</code>, or
+ <code>INKStatCoupledGlobalCategoryCreate</code> call).</p>
+</li>
+<li>
+<p>In your <code><Traffic Server>``/bin</code> directory, enter the
+ following:</p>
+<div class="codehilite"><pre><span class="o">./</span><span class="n">traffic_line</span> <span class="o">-</span><span class="n">r</span> <span class="n">the_name</span>
+</pre></div>
+
+
+</li>
+</ol>
</div>
<div id="footer">
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/WorkWHTTPHeaderFunc.en.html
URL: http://svn.apache.org/viewvc/websites/staging/trafficserver/trunk/content/docs/trunk/sdk/WorkWHTTPHeaderFunc.en.html?rev=778776&r1=778775&r2=778776&view=diff
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/WorkWHTTPHeaderFunc.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/WorkWHTTPHeaderFunc.en.html Sat Nov 6 06:31:06 2010
@@ -4,17 +4,64 @@
<html>
<!-- This template is for the bulk of the site! -->
<head>
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
-
+ <title>Apache Traffic Server⢠Software Developers Kit</title>
+ <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
- <h1></h1>
+ <h1>Apache Traffic Server⢠Software Developers Kit</h1>
<div id="content">
-
+ <p><a href="SettingUpTransacHook">Prev</a> - Setting Up a Transaction Hook
+The Basic Authorization Plugin -
+<a href="BasicAuthorizatonPlugin">Next</a></p>
+<h3 id="working_with_http_header_functions">Working with HTTP Header Functions</h3>
+<p>The Blacklist plugin examines the host header in every client
+transaction. This is done in the <code>handle_dns</code> routine, using
+<code>INKHttpTxnClientIPGet</code>, <code>INKHttpHdrUrlGet</code>, and <code>INKUrlHostGet</code>.</p>
+<div class="codehilite"><pre><span class="n">INKUrlHostGet</span><span class="o">.</span>
+<span class="n">static</span> <span class="n">void</span>
+<span class="n">handle_dns</span> <span class="p">(</span><span class="n">INKHttpTxn</span> <span class="n">txnp</span><span class="p">,</span> <span class="n">INKCont</span> <span class="n">contp</span><span class="p">)</span>
+<span class="p">{</span>
+ <span class="n">INKMBuffer</span> <span class="n">bufp</span><span class="p">;</span>
+ <span class="n">INKMLoc</span> <span class="n">hdr_loc</span><span class="p">;</span>
+ <span class="n">INKMLoc</span> <span class="n">url_loc</span><span class="p">;</span>
+ <span class="n">const</span> <span class="n">char</span> <span class="o">*</span><span class="n">host</span><span class="p">;</span>
+ <span class="nb">int</span> <span class="n">i</span><span class="p">;</span>
+
+ <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">INKHttpTxnClientIPGet</span> <span class="p">(</span><span class="n">txnp</span><span class="p">,</span> <span class="o">&</span><span class="n">bufp</span><span class="p">,</span> <span class="o">&</span><span class="n">hdr_loc</span><span class="p">))</span> <span class="p">{</span>
+ <span class="n">INKError</span> <span class="p">(</span><span class="s">"couldn't retrieve client request header\n"</span><span class="p">);</span>
+ <span class="nb">goto</span> <span class="n">done</span><span class="p">;</span>
+ <span class="p">}</span>
+
+ <span class="n">url_loc</span> <span class="o">=</span> <span class="n">INKHttpHdrUrlGet</span> <span class="p">(</span><span class="n">bufp</span><span class="p">,</span> <span class="n">hdr_loc</span><span class="p">);</span>
+
+ <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">url_loc</span><span class="p">)</span> <span class="p">{</span>
+ <span class="n">INKError</span> <span class="p">(</span><span class="s">"couldn't retrieve request url\n"</span><span class="p">);</span>
+ <span class="n">INKHandleMLocRelease</span> <span class="p">(</span><span class="n">bufp</span><span class="p">,</span> <span class="n">INK_NULL_MLOC</span><span class="p">,</span> <span class="n">hdr_loc</span><span class="p">);</span>
+ <span class="nb">goto</span> <span class="n">done</span><span class="p">;</span>
+ <span class="p">}</span>
+
+ <span class="n">host</span> <span class="o">=</span> <span class="n">INKUrlHostGet</span> <span class="p">(</span><span class="n">bufp</span><span class="p">,</span> <span class="n">url_loc</span><span class="p">,</span> <span class="n">NULL</span><span class="p">);</span>
+ <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">host</span><span class="p">)</span> <span class="p">{</span>
+ <span class="n">INKError</span> <span class="p">(</span><span class="s">"couldn't retrieve request hostname\n"</span><span class="p">);</span>
+ <span class="n">INKHandleMLocRelease</span> <span class="p">(</span><span class="n">bufp</span><span class="p">,</span> <span class="n">hdr_loc</span><span class="p">,</span> <span class="n">url_loc</span><span class="p">);</span>
+ <span class="n">INKHandleMLocRelease</span> <span class="p">(</span><span class="n">bufp</span><span class="p">,</span> <span class="n">INK_NULL_MLOC</span><span class="p">,</span> <span class="n">hdr_loc</span><span class="p">);</span>
+ <span class="nb">goto</span> <span class="n">done</span><span class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+
+
+<p>To access the host header, the plugin must first get the client
+request, retrieve the URL portion, and then obtain the host header.
+See <a href="HTTPHeaders" title="Chapter 10. HTTP Headers">HTTP Headers</a> for
+more information about these calls. See
+<a href="RlsMarshalBufHandles" title="Release Marshal Buffer Handles">Release Marshal Buffer Handles</a>
+for guidelines on using <code>INKHandleMLocRelease</code> and
+<code>INKHandleStringRelease</code>.</p>
</div>
<div id="footer">