Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 374

Show
Ignore:
Timestamp:
06/23/05 23:04:37
Author:
mikerobi
Message:

builtin filter docs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/book/xml/builtinfilters.xml

    r370 r374  
    66  <title>Builtin Filters</title> 
    77   
    8     <section
     8    <section id="baseurlfilter"
    99      <title>baseurlfilter</title> 
     10      <para> 
     11        The baseurlfilter changes the base url of a request. 
     12        It is usefull for running CherryPy behind Apache with mod-rewrite. 
     13      </para> 
     14       
     15      <para> 
     16        The baseurlfilter has the following configuration options 
     17      </para> 
     18 
     19      <itemizedlist> 
     20        <listitem>baseUrlFilter.baseUrl</listitem> 
     21        <listitem>baseUrlFilter.useXForwardedHost</listitem> 
     22      </itemizedlist> 
     23 
    1024    </section> 
    1125     
    12     <section
     26    <section id="cachefilter"
    1327      <title>cachefilter</title> 
    1428    </section> 
    1529     
    16     <section
     30    <section id="decodingfilter"
    1731      <title>decodingfilter</title> 
     32      <para> 
     33        The decoding filter can be configured to automatically decode incoming requests. 
     34      </para> 
     35       
     36      <para> 
     37        The decodingfilter has the following configuration options: 
     38      </para> 
     39       
     40      <itemizedlist> 
     41        <listitem>decodingFilter.encoding</listitem> 
     42      </itemizedlist> 
    1843    </section> 
    1944     
    20     <section
     45    <section id="encodingfilter"
    2146      <title>encodingfilter</title> 
     47       
     48      <para> 
     49        The encodingfilter can be configured to automatically outgoing responses. 
     50      </para> 
     51       
     52      <para> 
     53        The encodingfilter has the following configuration options: 
     54      </para> 
     55       
     56      <itemizedlist> 
     57        <listitem>encodingFilter.encoding</listitem> 
     58        <listitem>encodingFilter.mimeTypeList</listitem> 
     59      </itemizedlist> 
    2260    </section> 
    2361     
    24     <section
     62    <section id="gzipfilter"
    2563      <title>gzipfilter</title> 
     64      <para> 
     65        The gzipfilter will automatically gzip outgoing requests,  
     66        if it is supported by the client. 
     67      </para> 
     68 
     69      <para> 
     70        The gzipfilter does not have any configuration options. 
     71      </para> 
     72       
    2673    </section> 
    2774     
    28     <section
     75    <section id="logdebuginfofilter"
    2976      <title>logdebuginfofilter</title> 
     77      <para> 
     78        The logdebuinfofilter adds debug information to each page. 
     79        The filter is automatically turned on when the server 
     80        environment is set to development. 
     81      </para> 
     82 
     83      <para> 
     84        The logdebuginfo has the following configuration options: 
     85      </para> 
     86       
     87      <itemizedlist> 
     88        <itemizedlist>logDebugInfoFilter.mimeTypeList, ['text/html']</itemizedlist> 
     89        <itemizedlist>logDebugInfoFilter.logAsComment, False</itemizedlist> 
     90        <itemizedlist>logDebugInfoFilter.logBuildTime, True</itemizedlist> 
     91        <itemizedlist>logDebugInfoFilter.logPageSize, True</itemizedlist> 
     92      </itemizedlist> 
     93 
    3094    </section> 
    3195     
    32     <section
     96    <section id="staticfilter"
    3397      <title>staticfilter</title> 
     98      <para> 
     99        The static filter allows CherryPy to serve static files. 
     100      </para> 
     101       
     102      <para> 
     103        The staticfilter has the following configuration options: 
     104      </para> 
     105      
     106      <itemizedlist> 
     107        <listitem>staticFilter.file</listitem> 
     108        <listitem>staticFilter.dir</listitem> 
     109      </itemizedlist> 
     110 
    34111    </section> 
    35112     
    36     <section
     113    <section id="nsgmlsfilter"
    37114      <title>nsgmlsfilter</title> 
    38115    </section> 
    39116     
    40     <section
     117    <section id="tidyfilter"
    41118      <title>tidyfilter</title> 
     119      <para> 
     120        The tidyfilter cleans up returned html by running the response through Tidy. 
     121      </para> 
     122 
     123      <para> 
     124        Note that we use the standalone Tidy tool rather than the python 
     125        mxTidy module. This is because this module doesn't seem to be 
     126        stable and it crashes on some HTML pages (which means that the 
     127        server would also crash.) 
     128      </para> 
     129       
     130      <para> 
     131        The staticfilter has the following configuration options: 
     132      </para> 
     133 
     134      <itemizedlist> 
     135        <listitem>tidyFilter.tmpDir</listitem> 
     136        <listitem>tidyFilter.strictXml, False</listitem> 
     137        <listitem>tidyFilter.tidyPath</listitem> 
     138        <listitem>encodingFilter.errorsToIgnore, []</listitem> 
     139      </itemizedlist> 
     140 
    42141    </section> 
    43142     
    44     <section
     143    <section id="virtualhostfilter"
    45144      <title>virtualhostfilter</title> 
     145 
     146      <para> 
     147        The virtualhostfilter changes the ObjectPath based on the Host. 
     148        This filter when running multiple sites within one CP server. 
     149      </para> 
     150       
     151      <para> 
     152        The virtualhostfilter has the following configuration options: 
     153      </para> 
     154      <itemizedlist> 
     155        <listitem>virtualHostFilter.prefix, '/'</listitem> 
     156      </itemizedlist> 
    46157    </section> 
    47158     
    48     <section
     159    <section id="xmlrpcfilter"
    49160      <title>xmlrpcfilter</title> 
     161      <para> 
     162        The xmlrpcfilter converts XMLRPC to CherryPy2 object system and vice-versa. 
     163      </para> 
     164       
     165      <para> 
     166    PLEASE NOTE: 
     167     
     168    beforeRequestBody: 
     169        Unmarshalls the posted data to a methodname and parameters. 
     170        - These are stored in cpg.request.rpcMethod and .rpcParams 
     171        - The method is also stored in cpg.request.path, so CP2 will find 
     172          the right method to call for you, based on the root's position. 
     173    beforeFinalize: 
     174        Marshalls cpg.response.body to xmlrpc. 
     175        - Until resolved: cpg.response.body must be a python source string; 
     176          this string is 'eval'ed to return the results. This will be 
     177          resolved in the future. 
     178        - Content-Type and Content-Length are set according to the new 
     179          (marshalled) data 
     180      </para> 
     181       
     182      <para> 
     183        The xmlrpcfilter does not have any configuration options. 
     184      </para> 
     185       
    50186    </section> 
    51187     
    52     <section
     188    <section id="sessionauthfilter"
    53189      <title>sessionauthenticatefilter</title> 
    54190    </section> 
    55191     
    56     <section
     192    <section id="sessionfilter"
    57193      <title>sessionfilter</title> 
    58       <link endterm="standardfilters">The Session Filter has its own section</link> 
     194      The Session Filter has its own section 
    59195    </section> 
    60196 
    61      
    62197</section> 
  • trunk/docs/book/xml/byexample.xml

    r373 r374  
    55         xml:id="byexample"> 
    66  <title>CherryPy By Example</title> 
    7  
     7  <para> 
     8    The best way to learn CherryPy is to look at example programs. 
     9  </para> 
    810  <section> 
    911    <title>Hello World</title> 
     
    4547  </section> 
    4648 
     49  <!-- lets save this for later  
     50   
    4751  <section> 
    4852    <title>Get and Post</title> 
     
    145149  </section> 
    146150 
     151  --> 
    147152  <xi:include href="buildingblog.xml" /> 
    148153</chapter> 
  • trunk/docs/book/xml/filtersexplained.xml

    r370 r374  
    55         xml:id="filtersexplained"> 
    66  <title>Filters explained</title> 
    7   <xi:include href="filtersarchitecture.xml"/> 
     7  <para> 
     8    Filters provide a powerfull mechanism for extending CherryPy. 
     9    The aim is to provide code called at the HTTP request level itself. 
     10    More specifically it means that you can write code that will be called: 
     11  </para> 
     12   
     13  <itemizedlist> 
     14    <listitem> 
     15      before a request is processed 
     16    </listitem> 
     17    <listitem> 
     18      after a request has been processed 
     19    </listitem> 
     20    <listitem> 
     21      before a response is sent to the client 
     22    </listitem> 
     23    <listitem> 
     24      after a response is sent to the client 
     25    </listitem> 
     26  </itemizedlist> 
     27 
    828  <xi:include href="builtinfilters.xml"/> 
    929  <xi:include href="writingfilters.xml"/> 
  • trunk/docs/book/xml/serversarchitecture.xml

    r325 r374  
    1010  <section id="wsgiserver"> 
    1111    <title>WSGI server</title> 
     12    <para> 
     13      CherryPy 2.1 supports arbitrary WSGI servers, and includes 
     14      its own WSGI server (the default). This means that you should be 
     15      able to deploy your CherryPy application using Apache or IIS  
     16      (among others) without any changes to your application--only  
     17      the deployment scripts will change. 
     18    </para> 
     19     
     20    <section> 
     21      <title>mod_python</title> 
     22    </section> 
     23     
     24    <section> 
     25      <title>IIS/ASP</title> 
     26    </section> 
     27     
     28    <section> 
     29      <title>FastCGI</title> 
     30    </section> 
     31     
     32    <section> 
     33      <title>SCGI</title> 
     34    </section> 
     35     
    1236  </section> 
    1337  <section id="httpserver"> 

Hosted by WebFaction

Log in as guest/cpguest to create tickets