A task management system. At least this was the initial idea. Basically this it the base code for the taskrambler framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

537 lines
49 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Server: src/http/worker/process.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Server&#160;<span id="projectnumber">0.0.1</span></div>
<div id="projectbrief">HTTP/REST server implementation</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('process_8c.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<h1>src/http/worker/process.c File Reference</h1> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;sys/types.h&gt;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;time.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;sys/time.h&gt;</code><br/>
<code>#include &quot;class.h&quot;</code><br/>
<code>#include &quot;auth.h&quot;</code><br/>
<code>#include &quot;http/worker.h&quot;</code><br/>
<code>#include &quot;http/header.h&quot;</code><br/>
<code>#include &quot;http/message.h&quot;</code><br/>
<code>#include &quot;http/request.h&quot;</code><br/>
<code>#include &quot;http/response.h&quot;</code><br/>
<code>#include &quot;http/message/queue.h&quot;</code><br/>
<code>#include &quot;http/parser.h&quot;</code><br/>
<code>#include &quot;session.h&quot;</code><br/>
<code>#include &quot;stream.h&quot;</code><br/>
<code>#include &quot;hash.h&quot;</code><br/>
<code>#include &quot;utils/memory.h&quot;</code><br/>
<code>#include &quot;commons.h&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for process.c:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c__incl.png" border="0" usemap="#src_2http_2worker_2process_8c" alt=""/></div>
<map name="src_2http_2worker_2process_8c" id="src_2http_2worker_2process_8c">
</map>
</div>
</div>
<p><a href="process_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structHttpMessage.html">HttpMessage</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="process_8c.html#a88e0a288b7cb9bf0fd3921f258024228">httpWorkerGetAsset</a> (<a class="el" href="structHttpRequest.html">HttpRequest</a>, const char *, const char *, size_t)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="process_8c.html#a0c79ececf9335c2eb6017e13562c776d">httpWorkerAddCommonHeader</a> (<a class="el" href="structHttpMessage.html">HttpMessage</a>, <a class="el" href="structHttpMessage.html">HttpMessage</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="process_8c.html#a05882322d98d5710a5512c9255e03d71">httpWorkerProcess</a> (<a class="el" href="structHttpWorker.html">HttpWorker</a> this, <a class="el" href="structStream.html">Stream</a> st)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Georg Hopp</dd></dl>
<p>Copyright © 2012 Georg Hopp</p>
<p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;. </p>
<p>Definition in file <a class="el" href="process_8c_source.html">process.c</a>.</p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a0c79ececf9335c2eb6017e13562c776d"></a><!-- doxytag: member="process.c::httpWorkerAddCommonHeader" ref="a0c79ececf9335c2eb6017e13562c776d" args="(HttpMessage, HttpMessage)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void httpWorkerAddCommonHeader </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structHttpMessage.html">HttpMessage</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structHttpMessage.html">HttpMessage</a>&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="add__common__header_8c_source.html#l00036">36</a> of file <a class="el" href="add__common__header_8c_source.html">add_common_header.c</a>.</p>
<div class="fragment"><pre class="fragment">{
time_t t;
<span class="keyword">struct </span>tm * tmp;
<span class="keywordtype">char</span> buffer[200];
<span class="keywordtype">size_t</span> nbuf;
<span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a822f6dbc57aa48a7b04af28d5c664a77">httpMessageHasKeepAlive</a>(request)) {
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;header,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Connection&quot;</span>), <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Keep-Alive&quot;</span>)));
}
<span class="keywordflow">else</span> {
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;header,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Connection&quot;</span>), <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Close&quot;</span>)));
}
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;header,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Server&quot;</span>), <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;testserver&quot;</span>)));
<span class="keywordflow">switch</span>(((<a class="code" href="structHttpResponse.html">HttpResponse</a>)response)-&gt;status) {
<span class="keywordflow">case</span> 304:
<span class="keywordflow">break</span>;
<span class="keywordflow">default</span>:
nbuf = sprintf(buffer, <span class="stringliteral">&quot;%d&quot;</span>, response-&gt;nbody);
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;header,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Content-Length&quot;</span>), buffer, nbuf));
}
t = time(NULL);
tmp = localtime(&amp;t);
nbuf = strftime(buffer, <span class="keyword">sizeof</span>(buffer), <span class="stringliteral">&quot;%a, %d %b %Y %T %Z&quot;</span>, tmp);
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;header,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Date&quot;</span>), buffer, nbuf));
}
</pre></div>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c_a0c79ececf9335c2eb6017e13562c776d_cgraph.png" border="0" usemap="#process_8c_a0c79ececf9335c2eb6017e13562c776d_cgraph" alt=""/></div>
<map name="process_8c_a0c79ececf9335c2eb6017e13562c776d_cgraph" id="process_8c_a0c79ececf9335c2eb6017e13562c776d_cgraph">
<area shape="rect" id="node3" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88" title="hashAdd" alt="" coords="315,5,389,33"/><area shape="rect" id="node7" href="message_8h.html#a822f6dbc57aa48a7b04af28d5c664a77" title="httpMessageHasKeepAlive" alt="" coords="261,55,443,83"/><area shape="rect" id="node5" href="hashable_8h.html#a18043293eb74b036ff3adf679afd7606" title="hashableHandleDouble" alt="" coords="491,5,651,33"/><area shape="rect" id="node9" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113" title="hashGet" alt="" coords="535,55,607,83"/><area shape="rect" id="node11" href="utils_2hash_8h.html#a4fd82572cce0e6beb14977a4d527dd25" title="sdbm" alt="" coords="700,55,753,83"/></map>
</div>
</p>
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c_a0c79ececf9335c2eb6017e13562c776d_icgraph.png" border="0" usemap="#process_8c_a0c79ececf9335c2eb6017e13562c776d_icgraph" alt=""/></div>
<map name="process_8c_a0c79ececf9335c2eb6017e13562c776d_icgraph" id="process_8c_a0c79ececf9335c2eb6017e13562c776d_icgraph">
<area shape="rect" id="node3" href="process_8c.html#a05882322d98d5710a5512c9255e03d71" title="httpWorkerProcess" alt="" coords="263,5,396,33"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="a88e0a288b7cb9bf0fd3921f258024228"></a><!-- doxytag: member="process.c::httpWorkerGetAsset" ref="a88e0a288b7cb9bf0fd3921f258024228" args="(HttpRequest, const char *, const char *, size_t)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structHttpMessage.html">HttpMessage</a> httpWorkerGetAsset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structHttpRequest.html">HttpRequest</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="get__asset_8c_source.html#l00034">34</a> of file <a class="el" href="get__asset_8c_source.html">get_asset.c</a>.</p>
<div class="fragment"><pre class="fragment">{
<span class="keywordtype">char</span> * match;
<span class="keywordtype">size_t</span> nmatch;
<a class="code" href="structHttpHeader.html">HttpHeader</a> header;
header = <a class="code" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113">hashGet</a>(
((<a class="code" href="structHttpMessage.html">HttpMessage</a>)request)-&gt;header,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;If-None-Match&quot;</span>));
<span class="keywordflow">if</span> (NULL == header) {
match = <span class="stringliteral">&quot;&quot;</span>;
nmatch = 0;
}
<span class="keywordflow">else</span> {
match = (header-&gt;<a class="code" href="structHttpHeader.html#a34d93457f37f09aaf369bb16df485c39">value</a>)[0];
nmatch = (header-&gt;<a class="code" href="structHttpHeader.html#a3f813ff5ee403e50a83fffc2dbf5cbb6" title="len of value without \0">nvalue</a>)[0];
}
<span class="keywordflow">return</span> (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#aa82eb4fe60ad9c266df2d885d0aad418">httpResponseAsset</a>(
fname, mime, nmime, match, nmatch);
}
</pre></div>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c_a88e0a288b7cb9bf0fd3921f258024228_cgraph.png" border="0" usemap="#process_8c_a88e0a288b7cb9bf0fd3921f258024228_cgraph" alt=""/></div>
<map name="process_8c_a88e0a288b7cb9bf0fd3921f258024228_cgraph" id="process_8c_a88e0a288b7cb9bf0fd3921f258024228_cgraph">
<area shape="rect" id="node3" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113" title="hashGet" alt="" coords="228,5,300,33"/><area shape="rect" id="node7" href="response_8h.html#aa82eb4fe60ad9c266df2d885d0aad418" title="httpResponseAsset" alt="" coords="195,55,333,83"/><area shape="rect" id="node5" href="utils_2hash_8h.html#a4fd82572cce0e6beb14977a4d527dd25" title="sdbm" alt="" coords="419,5,472,33"/><area shape="rect" id="node9" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88" title="hashAdd" alt="" coords="557,81,632,109"/><area shape="rect" id="node13" href="response_8h.html#a7f82e65bb81c75c37a8910456708e209" title="httpResponse304" alt="" coords="383,106,508,134"/><area shape="rect" id="node11" href="hashable_8h.html#a18043293eb74b036ff3adf679afd7606" title="hashableHandleDouble" alt="" coords="680,81,840,109"/></map>
</div>
</p>
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c_a88e0a288b7cb9bf0fd3921f258024228_icgraph.png" border="0" usemap="#process_8c_a88e0a288b7cb9bf0fd3921f258024228_icgraph" alt=""/></div>
<map name="process_8c_a88e0a288b7cb9bf0fd3921f258024228_icgraph" id="process_8c_a88e0a288b7cb9bf0fd3921f258024228_icgraph">
<area shape="rect" id="node3" href="process_8c.html#a05882322d98d5710a5512c9255e03d71" title="httpWorkerProcess" alt="" coords="196,5,329,33"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="a05882322d98d5710a5512c9255e03d71"></a><!-- doxytag: member="process.c::httpWorkerProcess" ref="a05882322d98d5710a5512c9255e03d71" args="(HttpWorker this, Stream st)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ssize_t httpWorkerProcess </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structHttpWorker.html">HttpWorker</a>&#160;</td>
<td class="paramname"><em>this</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structStream.html">Stream</a>&#160;</td>
<td class="paramname"><em>st</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000006">Todo:</a></b></dt><dd>store the cookie count in the request to make a simple check possible to prevent this lookup if no cookies exists at all </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000007">Todo:</a></b></dt><dd>This is an application authorization not an HTTP authorization...anyway think about sending HTTP 401 messages if authorization is required and think about sending the credentials via header as described in the HTTP protocol. Most likely this will lead to hacky thing with javascript as i am not sure how far this is implemented within browsers. Anyway, for now we simply ignore a failed login within the response except that no session is initialized. We send an empty 200 OK </dd></dl>
</p>
<p>Definition at line <a class="el" href="process_8c_source.html#l00054">54</a> of file <a class="el" href="process_8c_source.html">process.c</a>.</p>
<div class="fragment"><pre class="fragment">{
ssize_t size;
<span class="keywordflow">if</span> (0 &lt; (size = <a class="code" href="parser_8h.html#a327e735e383c72c2b1da1bfd4734015e">httpParserParse</a>(this-&gt;parser, st))) {
<span class="keywordtype">int</span> i;
<a class="code" href="structHttpMessageQueue.html">HttpMessageQueue</a> reqq = this-&gt;parser-&gt;queue;
<a class="code" href="structHttpMessageQueue.html">HttpMessageQueue</a> respq = this-&gt;writer-&gt;queue;
<span class="keywordflow">for</span> (i=0; i&lt;reqq-&gt;<a class="code" href="structHttpMessageQueue.html#a807ccce02b7709326e8fc613b9cc3763">nmsgs</a>; i++) {
<a class="code" href="structHttpMessage.html">HttpMessage</a> rmessage = reqq-&gt;<a class="code" href="structHttpMessageQueue.html#afaff4b536d226f410b3e931e60d702ff">msgs</a>[i];
<a class="code" href="structHttpRequest.html">HttpRequest</a> request = (<a class="code" href="structHttpRequest.html">HttpRequest</a>)(reqq-&gt;<a class="code" href="structHttpMessageQueue.html#afaff4b536d226f410b3e931e60d702ff">msgs</a>[i]);
<a class="code" href="structHttpMessage.html">HttpMessage</a> response = NULL;
<span class="keywordflow">if</span> (NULL == this-&gt;session) {
<a class="code" href="structHashValue.html">HashValue</a> sidstr = <a class="code" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113">hashGet</a>(request-&gt;<a class="code" href="structHttpRequest.html#a409687f7142a45e623e2981c18bb6ff5">cookies</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;sid&quot;</span>));
<span class="keywordflow">if</span> (NULL != sidstr) {
<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sid;
sid = strtoul((<span class="keywordtype">char</span>*)(sidstr-&gt;<a class="code" href="structHashValue.html#ad2620fdeeee5e05b0cb9600c069e081e">value</a>), NULL, 10);
this-&gt;session = <a class="code" href="session_8h.html#a129f0576e17b0c9deb744fb3a96b3637">sessionGet</a>(this-&gt;sroot, sid);
}
}
<span class="keywordflow">if</span> (NULL != this-&gt;session) {
<span class="keywordflow">if</span> (time(NULL) &lt; this-&gt;session-&gt;livetime) {
this-&gt;session-&gt;livetime = time(NULL) + <a class="code" href="session_8h.html#ad9da4a25e5fdbb8957a013ad739e032d">SESSION_LIVETIME</a>;
} <span class="keywordflow">else</span> {
<a class="code" href="session_8h.html#ad14f3c6c8402061b01328d6e95975c8e">sessionDelete</a>(this-&gt;sroot, this-&gt;session-&gt;id);
<span class="keyword">delete</span>(this-&gt;session);
}
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;POST&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a266c616e67dea85335c9fcfca6e5c0cb">method</a>)) {
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/login/&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
<span class="keywordtype">char</span> buffer[200];
<span class="keywordtype">size_t</span> nbuf;
<a class="code" href="structHashValue.html">HashValue</a> username = <a class="code" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113">hashGet</a>(request-&gt;<a class="code" href="structHttpRequest.html#a4d77c7642fd3ef8bdcd09edfe62927db">post</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;username&quot;</span>));
<a class="code" href="structHashValue.html">HashValue</a> password = <a class="code" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113">hashGet</a>(request-&gt;<a class="code" href="structHttpRequest.html#a4d77c7642fd3ef8bdcd09edfe62927db">post</a>, <a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;password&quot;</span>));
<span class="keywordflow">if</span> (NULL == password || NULL == username) {
response = <span class="keyword">new</span>(<a class="code" href="structHttpResponse.html">HttpResponse</a>, <span class="stringliteral">&quot;HTTP/1.1&quot;</span>, 403, <span class="stringliteral">&quot;Forbidden&quot;</span>);
}
<span class="keywordflow">if</span> (NULL == response) {
<a class="code" href="structCredential.html">Credential</a> cred = <span class="keyword">new</span>(<a class="code" href="structCredential.html">Credential</a>,
<a class="code" href="credential_8h.html#ae7b3cf1c6c200a9a07e83688137fd492ad1ac9365f25a3cf968fb38736e7ef8d0">CRED_PASSWORD</a>,
(<span class="keywordtype">char</span>*)(username-&gt;<a class="code" href="structHashValue.html#ad2620fdeeee5e05b0cb9600c069e081e">value</a>), username-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a>,
(<span class="keywordtype">char</span>*)(password-&gt;<a class="code" href="structHashValue.html#ad2620fdeeee5e05b0cb9600c069e081e">value</a>), password-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a>);
<span class="keywordflow">if</span> (!<a class="code" href="auth_2interface_2auth_8h.html#ab945bc2a04f35ed92362f0c08762a00b">authenticate</a>(this-&gt;auth, cred)) {
response = <span class="keyword">new</span>(<a class="code" href="structHttpResponse.html">HttpResponse</a>, <span class="stringliteral">&quot;HTTP/1.1&quot;</span>, 403, <span class="stringliteral">&quot;Forbidden&quot;</span>);
} <span class="keywordflow">else</span> {
<span class="keywordflow">if</span> (NULL == this-&gt;session) {
this-&gt;session = <a class="code" href="session_8h.html#a1100c55cd86008f7e5931e5e7c517881">sessionAdd</a>(
this-&gt;sroot,
<span class="keyword">new</span>(<a class="code" href="structSession.html">Session</a>,
username-&gt;<a class="code" href="structHashValue.html#ad2620fdeeee5e05b0cb9600c069e081e">value</a>,
username-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a>));
} <span class="keywordflow">else</span> {
this-&gt;session-&gt;username = malloc(username-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a> + 1);
this-&gt;session-&gt;username[username-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a>] = 0;
memcpy(this-&gt;session-&gt;username,
username-&gt;<a class="code" href="structHashValue.html#ad2620fdeeee5e05b0cb9600c069e081e">value</a>,
username-&gt;<a class="code" href="structHashValue.html#aa7080606f7a63a3b8687e32f5492034b">nvalue</a>);
}
nbuf = sprintf(buffer,
<span class="stringliteral">&quot;sid=%lu;Path=/&quot;</span>,
this-&gt;session-&gt;id);
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#ab28f3da2d73c756c0640d286c3fd37c5">httpResponseSession</a>(
this-&gt;session);
<a class="code" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88">hashAdd</a>(response-&gt;<a class="code" href="structHttpMessage.html#a955ece5fe9f32a91da312c8b9e1f8ab4">header</a>,
<span class="keyword">new</span>(<a class="code" href="structHttpHeader.html">HttpHeader</a>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;Set-Cookie&quot;</span>),
buffer, nbuf));
}
<span class="keyword">delete</span>(cred);
}
}
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;GET&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a266c616e67dea85335c9fcfca6e5c0cb">method</a>)) {
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/html/main.html&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/html&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/sessinfo/&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#ab28f3da2d73c756c0640d286c3fd37c5">httpResponseSession</a>(this-&gt;session);
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/sess/&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
<span class="keywordflow">if</span> (NULL == this-&gt;session) {
this-&gt;session = <a class="code" href="session_8h.html#a1100c55cd86008f7e5931e5e7c517881">sessionAdd</a>(
this-&gt;sroot,
<span class="keyword">new</span>(<a class="code" href="structSession.html">Session</a>, NULL, 0));
}
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#ab28f3da2d73c756c0640d286c3fd37c5">httpResponseSession</a>(this-&gt;session);
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/randval/&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
<span class="keywordflow">if</span> (NULL != this-&gt;session) {
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#af6ecda2c1f45abc258b7c70767c6b392">httpResponseRandval</a>(
this-&gt;val-&gt;timestamp,
this-&gt;<a class="code" href="structHttpWorker.html#ac2ce7397a55212bde34e95f27720d6bd">val</a>-&gt;<a class="code" href="structrandval.html#ada52f1346b93f8e296aa2488836311ec">value</a>);
} <span class="keywordflow">else</span> {
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#a10bdf15320dd802fed606cadf5f3cc2c">httpResponse403</a>();
}
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/image/me&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/image/waldschrat.jpg&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;image/jpeg&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/assets/js/jquery&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/js/jquery-1.7.1.min.js&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/javascript&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/assets/js/serverval&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/js/serverval.js&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/javascript&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/assets/js/session&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/js/session.js&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/javascript&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/assets/js/init&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/js/init.js&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/javascript&quot;</span>));
}
<span class="keywordflow">if</span> (0 == strcmp(<span class="stringliteral">&quot;/assets/style/common&quot;</span>, request-&gt;<a class="code" href="structHttpRequest.html#a926ff822acf2322656d96e70e7b7c97f">path</a>)) {
response = <a class="code" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158">httpWorkerGetAsset</a>(
request,
<span class="stringliteral">&quot;./assets/style/common.css&quot;</span>,
<a class="code" href="memory_8h.html#a2a9234835facec8c1ebca59c214391e3" title="Const STRing Argument.">CSTRA</a>(<span class="stringliteral">&quot;text/css&quot;</span>));
}
}
<span class="keywordflow">if</span> (NULL == response) {
response = (<a class="code" href="structHttpMessage.html">HttpMessage</a>)<a class="code" href="response_8h.html#aeab2dc61e86e010d1eb3511eaf8d8ad0">httpResponse404</a>();
}
<a class="code" href="add__common__header_8c.html#add957dad05e83999f82233f85b1ca535">httpWorkerAddCommonHeader</a>((<a class="code" href="structHttpMessage.html">HttpMessage</a>)request, response);
respq-&gt;<a class="code" href="structHttpMessageQueue.html#afaff4b536d226f410b3e931e60d702ff">msgs</a>[(respq-&gt;<a class="code" href="structHttpMessageQueue.html#a807ccce02b7709326e8fc613b9cc3763">nmsgs</a>)++] = response;
response = NULL;
<span class="keyword">delete</span>((reqq-&gt;<a class="code" href="structHttpMessageQueue.html#afaff4b536d226f410b3e931e60d702ff">msgs</a>)[i]);
}
reqq-&gt;<a class="code" href="structHttpMessageQueue.html#a807ccce02b7709326e8fc613b9cc3763">nmsgs</a> = 0;
}
<span class="keywordflow">return</span> size;
}
</pre></div>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="process_8c_a05882322d98d5710a5512c9255e03d71_cgraph.png" border="0" usemap="#process_8c_a05882322d98d5710a5512c9255e03d71_cgraph" alt=""/></div>
<map name="process_8c_a05882322d98d5710a5512c9255e03d71_cgraph" id="process_8c_a05882322d98d5710a5512c9255e03d71_cgraph">
<area shape="rect" id="node3" href="auth_2interface_2auth_8h.html#ab945bc2a04f35ed92362f0c08762a00b" title="authenticate" alt="" coords="247,29,340,57"/><area shape="rect" id="node6" href="hash_2hash_8h.html#a15c5c8fa9517a5dadcdbdd024f3dea88" title="hashAdd" alt="" coords="911,307,985,335"/><area shape="rect" id="node10" href="hash_2hash_8h.html#ae63f5dffd0f7894f09a5f9b725cb6113" title="hashGet" alt="" coords="721,434,793,462"/><area shape="rect" id="node14" href="parser_8h.html#a327e735e383c72c2b1da1bfd4734015e" title="httpParserParse" alt="" coords="477,814,595,842"/><area shape="rect" id="node79" href="response_8h.html#a10bdf15320dd802fed606cadf5f3cc2c" title="httpResponse403" alt="" coords="231,535,356,563"/><area shape="rect" id="node81" href="response_8h.html#aeab2dc61e86e010d1eb3511eaf8d8ad0" title="httpResponse404" alt="" coords="473,130,599,158"/><area shape="rect" id="node84" href="response_8h.html#af6ecda2c1f45abc258b7c70767c6b392" title="httpResponseRandval" alt="" coords="460,181,612,209"/><area shape="rect" id="node87" href="response_8h.html#ab28f3da2d73c756c0640d286c3fd37c5" title="httpResponseSession" alt="" coords="460,231,612,259"/><area shape="rect" id="node90" href="add__common__header_8c.html#add957dad05e83999f82233f85b1ca535" title="httpWorkerAddCommonHeader" alt="" coords="189,383,397,411"/><area shape="rect" id="node96" href="get__asset_8c.html#a69ca591563d52afa450af7390568d158" title="httpWorkerGetAsset" alt="" coords="223,333,364,361"/><area shape="rect" id="node105" href="session_8h.html#a1100c55cd86008f7e5931e5e7c517881" title="sessionAdd" alt="" coords="248,586,339,614"/><area shape="rect" id="node107" href="session_8h.html#ad14f3c6c8402061b01328d6e95975c8e" title="sessionDelete" alt="" coords="241,637,345,665"/><area shape="rect" id="node109" href="session_8h.html#a129f0576e17b0c9deb744fb3a96b3637" title="sessionGet" alt="" coords="249,687,337,715"/><area shape="rect" id="node8" href="hashable_8h.html#a18043293eb74b036ff3adf679afd7606" title="hashableHandleDouble" alt="" coords="1056,307,1216,335"/><area shape="rect" id="node12" href="utils_2hash_8h.html#a4fd82572cce0e6beb14977a4d527dd25" title="sdbm" alt="" coords="921,434,975,462"/><area shape="rect" id="node16" href="cbuf_8h.html#abc3bb54c6a324c849b872823ec70ce62" title="cbufGetData" alt="" coords="709,1143,805,1171"/><area shape="rect" id="node18" href="cbuf_8h.html#a652d95658664b0658eceaa09e93a3252" title="cbufGetRead" alt="" coords="1087,1219,1185,1247"/><area shape="rect" id="node20" href="cbuf_8h.html#ac6a5c458373606ebadf44cb631a615cb" title="cbufIncRead" alt="" coords="900,1093,996,1121"/><area shape="rect" id="node22" href="cbuf_8h.html#a60512cdcca11f127c26a8a30e42b8c5c" title="cbufGetLine" alt="" coords="711,1194,804,1222"/><area shape="rect" id="node34" href="cbuf_8h.html#aa041996b32209a9b81a3e5db178c8339" title="cbufIsEmpty" alt="" coords="709,637,805,665"/><area shape="rect" id="node36" href="cbuf_8h.html#a87c05ad967d95ea590151e69af0ff4fe" title="cbufIsLocked" alt="" coords="708,687,807,715"/><area shape="rect" id="node38" href="cbuf_8h.html#a9836b66494452a0b01511163285e2ba6" title="cbufLock" alt="" coords="720,738,795,766"/><area shape="rect" id="node40" href="cbuf_8h.html#a6e4de5096568ca24607ed25184f39621" title="cbufRead" alt="" coords="719,991,796,1019"/><area shape="rect" id="node50" href="cbuf_8h.html#aa6b501bd8016dfe1951f54dffe59262e" title="cbufRelease" alt="" coords="709,789,805,817"/><area shape="rect" id="node52" href="cbuf_8h.html#aee8e983250f1f7b58d98cc70b765493a" title="cbufSetData" alt="" coords="709,941,805,969"/><area shape="rect" id="node57" href="cbuf_8h.html#a1983134b7a26ad2ea077adcd343dca24" title="cbufSkipNonAlpha" alt="" coords="692,1042,823,1070"/><area shape="rect" id="node62" href="parser_8h.html#ada957e3200a4127a9a803e5312610651" title="httpParserBody" alt="" coords="700,839,815,867"/><area shape="rect" id="node64" href="parser_8h.html#a3add6b1b4a1e26a5baa86f2fa4c9d843" title="httpParserHeader" alt="" coords="695,485,820,513"/><area shape="rect" id="node67" href="parser_8h.html#ad17a51c93dbb9085c719de8a586614d2" title="httpParserNewMessage" alt="" coords="676,890,839,918"/><area shape="rect" id="node73" href="parser_8h.html#a0ac1a5d015b74c978d757b2867786693" title="httpParserPostVars" alt="" coords="689,535,825,563"/><area shape="rect" id="node76" href="parser_8h.html#a3ed6fd01af0d4079f592fd492b79672b" title="httpParserRequestVars" alt="" coords="677,586,837,614"/><area shape="rect" id="node24" href="cbuf_8h.html#afea7754e8d68ccc6b7e21dc74d7c7226" title="cbufAddrIndex" alt="" coords="895,1194,1001,1222"/><area shape="rect" id="node29" href="cbuf_8h.html#a49cdbb3d52ada4cef5a6e88267aacad3" title="cbufMemchr" alt="" coords="900,1245,996,1273"/><area shape="rect" id="node42" href="cbuf_8h.html#a68666a5ebddc6682b6786cc604072478" title="cbufGetFree" alt="" coords="900,890,996,918"/><area shape="rect" id="node44" href="cbuf_8h.html#ae0e7a74c1e6c503c3cfd0ae5bc8702fd" title="cbufGetWrite" alt="" coords="899,941,997,969"/><area shape="rect" id="node46" href="cbuf_8h.html#a7afb7def79f9b383ac2ff39ffdbb6b7e" title="cbufIncWrite" alt="" coords="900,839,996,867"/><area shape="rect" id="node48" href="stream_2stream_8h.html#a8201bfbd89d6721bd1e5aac63970e890" title="streamRead" alt="" coords="901,991,995,1019"/><area shape="rect" id="node69" href="utils_2http_8h.html#a8cc0ef803a5d857c0c8a0d78172b61ed" title="httpGetMessage" alt="" coords="888,789,1008,817"/><area shape="rect" id="node71" href="utils_2http_8h.html#a0761fd0e4914a7f912dd354c63458c1d" title="isHttpVersion" alt="" coords="1085,789,1187,817"/><area shape="rect" id="node93" href="message_8h.html#a822f6dbc57aa48a7b04af28d5c664a77" title="httpMessageHasKeepAlive" alt="" coords="445,434,627,462"/><area shape="rect" id="node99" href="response_8h.html#aa82eb4fe60ad9c266df2d885d0aad418" title="httpResponseAsset" alt="" coords="467,282,605,310"/><area shape="rect" id="node102" href="response_8h.html#a7f82e65bb81c75c37a8910456708e209" title="httpResponse304" alt="" coords="695,333,820,361"/></map>
</div>
</p>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="process_8c.html">process.c</a> </li>
<li class="footer">Generated on Wed Mar 28 2012 10:39:45 for Server by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</body>
</html>