MobileBlur

web2py.gluon.rocket-module.html at [6548f791b4]
Login

web2py.gluon.rocket-module.html at [6548f791b4]

File applications/examples/static/epydoc/web2py.gluon.rocket-module.html artifact f74f937a0f part of check-in 6548f791b4


<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rocket
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module rocket</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.NullHandler-class.html" class="summary-name">NullHandler</a><br />
      A Logging handler to prevent library errors.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Connection-class.html" class="summary-name">Connection</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Listener-class.html" class="summary-name">Listener</a><br />
      The Listener class is a class responsible for accepting 
        connections and queuing them to be processed by a worker 
        thread.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Rocket-class.html" class="summary-name">Rocket</a><br />
      The Rocket class is responsible for handling threads and 
        accepting and dispatching connections.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Monitor-class.html" class="summary-name">Monitor</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ThreadPool-class.html" class="summary-name">ThreadPool</a><br />
      The ThreadPool class is a container class for all the worker 
        threads.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SSLError-class.html" class="summary-name">SSLError</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Headers-class.html" class="summary-name">Headers</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.FileWrapper-class.html" class="summary-name">FileWrapper</a><br />
      Wrapper to convert file-like objects to iterables
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Worker-class.html" class="summary-name">Worker</a><br />
      The Worker class is a base class responsible for receiving 
        connections and (a subclass) will run an application to process the
        the connection
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketTimeout-class.html" class="summary-name">SocketTimeout</a><br />
      Exception for when a socket times out between requests.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.BadRequest-class.html" class="summary-name">BadRequest</a><br />
      Exception for when a client sends an incomprehensible 
        request.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketClosed-class.html" class="summary-name">SocketClosed</a><br />
      Exception for when a socket is closed by the client.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ChunkedReader-class.html" class="summary-name">ChunkedReader</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.WSGIWorker-class.html" class="summary-name">WSGIWorker</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#b" class="summary-sig-name">b</a>(<span class="summary-sig-arg">val</span>)</span><br />
      Convert string/unicode/bytes literals into bytes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#u" class="summary-sig-name">u</a>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span><br />
      Convert bytes into string/unicode.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CherryPyWSGIServer"></a><span class="summary-sig-name">CherryPyWSGIServer</span>(<span class="summary-sig-arg">bind_addr</span>,
        <span class="summary-sig-arg">wsgi_app</span>,
        <span class="summary-sig-arg">numthreads</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">server_name</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">max</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">request_queue_size</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">shutdown_timeout</span>=<span class="summary-sig-default">5</span>)</span><br />
      A Cherrypy wsgiserver-compatible wrapper.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#CherryPyWSGIServer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#_formatparam" class="summary-sig-name">_formatparam</a>(<span class="summary-sig-arg">param</span>,
        <span class="summary-sig-arg">value</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">quote</span>=<span class="summary-sig-default">1</span>)</span><br />
      Convenience function to format and return a key=value pair.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#_formatparam">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_method"></a><span class="summary-sig-name">get_method</span>(<span class="summary-sig-arg">method</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#get_method">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="demo_app"></a><span class="summary-sig-name">demo_app</span>(<span class="summary-sig-arg">environ</span>,
        <span class="summary-sig-arg">start_response</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#demo_app">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="demo"></a><span class="summary-sig-name">demo</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#demo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="'1.2.2'"><code class="variable-quote">'</code><code class="variable-string">1.2.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_NAME"></a><span class="summary-name">SERVER_NAME</span> = <code title="'www'"><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_SOFTWARE"></a><span class="summary-name">SERVER_SOFTWARE</span> = <code title="'Rocket 1.2.2'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.2.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTTP_SERVER_SOFTWARE"></a><span class="summary-name">HTTP_SERVER_SOFTWARE</span> = <code title="'Rocket 1.2.2 Python/2.5.2'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.2.2 Python/2.5.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BUF_SIZE"></a><span class="summary-name">BUF_SIZE</span> = <code title="16384">16384</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SOCKET_TIMEOUT"></a><span class="summary-name">SOCKET_TIMEOUT</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="THREAD_STOP_CHECK_INTERVAL"></a><span class="summary-name">THREAD_STOP_CHECK_INTERVAL</span> = <code title="1">1</code><br />
      PyMySQL: A pure-Python drop-in replacement for MySQLdb.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IS_JYTHON"></a><span class="summary-name">IS_JYTHON</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IGNORE_ERRORS_ON_CLOSE"></a><span class="summary-name">IGNORE_ERRORS_ON_CLOSE</span> = <code title="set([103, 104])"><code class="variable-group">set([</code>103<code class="variable-op">, </code>104<code class="variable-group">])</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_LISTEN_QUEUE_SIZE"></a><span class="summary-name">DEFAULT_LISTEN_QUEUE_SIZE</span> = <code title="5">5</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MIN_THREADS"></a><span class="summary-name">DEFAULT_MIN_THREADS</span> = <code title="10">10</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MAX_THREADS"></a><span class="summary-name">DEFAULT_MAX_THREADS</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#DEFAULTS" class="summary-name">DEFAULTS</a> = <code title="{'LISTEN_QUEUE_SIZE': 5, 'MAX_THREADS': 0, 'MIN_THREADS': 10}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>0<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_THR</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PY3K"></a><span class="summary-name">PY3K</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="has_ssl"></a><span class="summary-name">has_ssl</span> = <code title="True">True</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('Rocket.Errors.ThreadPool')">logging.getLogger('Rocket.Errors.ThreadPool')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="re_SLASH"></a><span class="summary-name">re_SLASH</span> = <code title="re.compile(r'(?i)%2F')">re.compile(r'<code class="re-flags">(?i)</code>%2F')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#re_REQUEST_LINE" class="summary-name">re_REQUEST_LINE</a> = <code title="re.compile(r'(?x)^(?P&lt;method&gt;OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CO\
NNECT) ((?P&lt;scheme&gt;[^:/]+)(://)(?P&lt;host&gt;[^/]+))?(?P&lt;path&gt;(\*|/[^ \?]*)\
)(\?(?P&lt;query_string&gt;[^ ]+))? (?P&lt;protocol&gt;HTTPS?/1\.[01])$')">re.compile(r'<code class="re-flags">(?x)</code>^<code class="re-group">(?P&lt;</code><code class="re-ref">method</code><code class="re-group">&gt;</code>OPTIONS<code class="re-op">|</code>GET<code class="re-op">|</code>HEA<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#LOG_LINE" class="summary-name">LOG_LINE</a> = <code title="'%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s'"><code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#RESPONSE" class="summary-name">RESPONSE</a> = <code title="'''HTTP/1.1 %s
Content-Length: %i
Content-Type: %s

%s
'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\nContent-Length: %i\nContent-Type: %s\</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#HTTP_METHODS" class="summary-name">HTTP_METHODS</a> = <code title="set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONN\
ECT'])">set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', '<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_tspecials"></a><span class="summary-name">_tspecials</span> = <code title="re.compile(r'[ \(\)&lt;&gt;@,;:\\&quot;/\[\]\?=]')">re.compile(r'<code class="re-group">[</code> \(\)&lt;&gt;@,;:\\&quot;/\[\]\?=<code class="re-group">]</code>')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NEWLINE"></a><span class="summary-name">NEWLINE</span> = <code title="'''\r
'''"><code class="variable-quote">'</code><code class="variable-string">\r\n</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HEADER_RESPONSE"></a><span class="summary-name">HEADER_RESPONSE</span> = <code title="'''HTTP/1.1 %s\r
%s'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\r\n%s</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#BASE_ENV" class="summary-name">BASE_ENV</a> = <code title="{'SCRIPT_NAME': '',
 'SERVER_NAME': 'www',
 'wsgi.errors': &lt;epydoc.docintrospecter._DevNull instance at 0x2b630b3\
2a440&gt;,
 'wsgi.file_wrapper': &lt;class web2py.gluon.rocket.FileWrapper at 0x13da\
350&gt;,
 'wsgi.multiprocess': False,
 'wsgi.run_once': False,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SCRIPT_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">wsgi.err</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="b"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">b</span>(<span class="sig-arg">val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert string/unicode/bytes literals into bytes.  This allows for the
  same code to run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="u"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">u</span>(<span class="sig-arg">val</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert bytes into string/unicode.  This allows for the same code to 
  run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_formatparam"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_formatparam</span>(<span class="sig-arg">param</span>,
        <span class="sig-arg">value</span>=<span class="sig-default">1</span>,
        <span class="sig-arg">quote</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#_formatparam">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Convenience function to format and return a key=value pair.</p>
  This will quote the value if needed or if quote is true.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="DEFAULTS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">DEFAULTS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>0<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>10<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="re_REQUEST_LINE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">re_REQUEST_LINE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?x)</code>^<code class="re-group">(?P&lt;</code><code class="re-ref">method</code><code class="re-group">&gt;</code>OPTIONS<code class="re-op">|</code>GET<code class="re-op">|</code>HEAD<code class="re-op">|</code>POST<code class="re-op">|</code>PUT<code class="re-op">|</code>DELETE<code class="re-op">|</code>TRACE<code class="re-op">|</code>CO<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
NNECT<code class="re-group">)</code> <code class="re-group">(</code><code class="re-group">(?P&lt;</code><code class="re-ref">scheme</code><code class="re-group">&gt;</code><code class="re-group">[</code><code class="re-op">^</code>:/<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>://<code class="re-group">)</code><code class="re-group">(?P&lt;</code><code class="re-ref">host</code><code class="re-group">&gt;</code><code class="re-group">[^</code>/<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">(?P&lt;</code><code class="re-ref">path</code><code class="re-group">&gt;</code><code class="re-group">(</code>\*<code class="re-op">|</code>/<code class="re-group">[</code><code class="re-op">^</code> \?<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-group"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="re-group">)</code><code class="re-group">(</code>\?<code class="re-group">(?P&lt;</code><code class="re-ref">query_string</code><code class="re-group">&gt;</code><code class="re-group">[^</code> <code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code> <code class="re-group">(?P&lt;</code><code class="re-ref">protocol</code><code class="re-group">&gt;</code>HTTPS<code class="re-op">?</code>/1\.<code class="re-group">[</code>01<code class="re-group">]</code><code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="LOG_LINE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">LOG_LINE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="RESPONSE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">RESPONSE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">HTTP/1.1 %s</code>
<code class="variable-string">Content-Length: %i</code>
<code class="variable-string">Content-Type: %s</code>
<code class="variable-string"></code>
<code class="variable-string">%s</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="HTTP_METHODS"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">HTTP_METHODS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONN<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ECT'])
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="BASE_ENV"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">BASE_ENV</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SCRIPT_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.errors</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;epydoc.docintrospecter._DevNull instance at 0x2b630b3<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
2a440&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.file_wrapper</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class web2py.gluon.rocket.FileWrapper at 0x13da<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
350&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.multiprocess</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.run_once</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Aug  4 00:46:59 2011
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>