Changeset 1948

Show
Ignore:
Timestamp:
09/05/08 13:12:41 (4 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1947 r1948  
    112008-09-05  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * admin/PageAdvanced.py, admin/PageGeneral.py: The keepalive 
     4        option has been moved to the advanced page. A new option to enable 
     5        or disable Chunked encoding has been added as well. 
    26 
    37        * cherokee/connection-protected.h, cherokee/handler_cgi_base.c, 
  • cherokee/trunk/admin/PageAdvanced.py

    r1740 r1948  
    1616    ('server!max_connection_reuse',   validations.is_positive_int), 
    1717    ('server!log_flush_elapse',       validations.is_positive_int), 
     18    ("server!keepalive",              validations.is_boolean), 
    1819    ('server!keepalive_max_requests', validations.is_positive_int) 
    1920] 
     
    3637NOTE_REUSE_CONNS  = 'Set the number of how many internal connections can be held for reuse by each thread. Default 20.' 
    3738NOTE_FLUSH_TIME   = 'Sets the number of seconds between log consolidations (flushes). Default: 10 seconds.' 
     39NOTE_KEEPALIVE    = 'Enables the server-wide keep-alive support. It increases the performance. It is usually set on.' 
    3840NOTE_KEEPALIVE_RS = 'Maximum number of HTTP requests that can be served by each keepalive connection.' 
    39  
     41NOTE_CHUNKED      = 'Allows the server to use Chunked encoding to try to keep Keep-Alive enabled.' 
    4042 
    4143class PageAdvanced (PageMenu, FormHelper): 
     
    6062        txt += self.Dialog(WARNING, 'warning') 
    6163 
     64        txt += "<h2>Connections management</h2>" 
     65        table = TableProps() 
     66        self.AddPropCheck    (table, 'Keep Alive',         'server!keepalive', True, NOTE_KEEPALIVE)         
     67        self.AddPropEntry    (table, 'Max keepalive reqs', 'server!keepalive_max_requests', NOTE_KEEPALIVE_RS) 
     68        self.AddPropCheck    (table, 'Chunked Encoding',   'server!chunked_encoding', True, NOTE_CHUNKED)         
     69        txt += self.Indent(table) 
     70 
    6271        txt += "<h2>System tweaking</h2>" 
    6372        table = TableProps() 
     
    8190        self.AddPropEntry    (table, 'Reuse connections',      'server!max_connection_reuse',   NOTE_REUSE_CONNS) 
    8291        self.AddPropEntry    (table, 'Log flush time',         'server!log_flush_elapse',       NOTE_FLUSH_TIME) 
    83         self.AddPropEntry    (table, 'Max keepalive reqs',     'server!keepalive_max_requests', NOTE_KEEPALIVE_RS) 
    8492        txt += self.Indent(table) 
    8593 
     
    8896 
    8997    def _op_apply_changes (self, uri, post): 
    90         self.ApplyChanges ([], post, DATA_VALIDATION) 
     98        self.ApplyChanges (['server!keepalive', 'server!chunked_encoding'],  
     99                           post, validation = DATA_VALIDATION) 
    91100 
  • cherokee/trunk/admin/PageGeneral.py

    r1932 r1948  
    1616 
    1717DATA_VALIDATION = [ 
    18     ("server!keepalive", validations.is_boolean), 
    1918    ("server!ipv6",      validations.is_boolean), 
    2019    ("server!port.*",    validations.is_tcp_port), 
     
    2827NOTE_LISTEN    = 'IP address of the interface to bind. It is usually empty.' 
    2928NOTE_TIMEOUT   = 'Time interval until the server closes inactive connections.' 
    30 NOTE_KEEPALIVE = 'Enables the server-wide keep-alive support. It increases the performance. It is usually set on.' 
    3129NOTE_TOKENS    = 'This option allows to choose how the server identifies itself.' 
    3230NOTE_USER      = 'Changes the effective user. User names and IDs are accepted.' 
     
    6058        table = TableProps() 
    6159        self.AddPropEntry (table,  'Timeout (<i>secs</i>)', 'server!timeout',  NOTE_TIMEOUT) 
    62         self.AddPropCheck (table,  'Keep Alive',            'server!keepalive', True, NOTE_KEEPALIVE) 
    6360        self.AddPropOptions(table, 'Server Tokens',         'server!server_tokens', PRODUCT_TOKENS, NOTE_TOKENS) 
    6461        txt += self.Indent(table) 
     
    7572         
    7673    def _op_apply_changes (self, uri, post): 
    77         self.ApplyChanges (['server!ipv6', 'server!keepalive'], post,  
    78                            validation = DATA_VALIDATION) 
     74        self.ApplyChanges (['server!ipv6'], post, validation = DATA_VALIDATION) 
     75