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

Changeset 1057

Show
Ignore:
Timestamp:
04/22/06 15:23:01
Author:
fumanchu
Message:

Fluff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/config.py

    r1055 r1057  
    101101reset() 
    102102 
    103 def get(key, default_value=None, return_section=False, path = None): 
     103def get(key, default_value=None, return_section=False, path=None): 
    104104    """Return the configuration value corresponding to key 
    105105    If specified, return default_value on lookup failure. If return_section is 
  • trunk/cherrypy/lib/caching.py

    r1054 r1057  
    1  
     1import Queue 
    22import threading 
    3 import Queue 
    43import time 
    54 
     
    105104    cherrypy.request.cached = c = bool(cacheData) 
    106105    if c: 
    107         serve_cache(cacheData) 
     106        expirationTime, lastModified, obj = cacheData 
     107        modifiedSince = cherrypy.request.headers.get('If-Modified-Since', None) 
     108        if modifiedSince is not None and modifiedSince == lastModified: 
     109            cherrypy._cache.totNonModified += 1 
     110            cherrypy.response.status = "304 Not Modified" 
     111            cherrypy.response.body = None 
     112        else: 
     113            # serve it & get out from the request 
     114            cherrypy.response.status, cherrypy.response.header_list, body = obj 
     115            cherrypy.response.body = body 
    108116    return c 
    109  
    110 def serve_cache(cacheData): 
    111     expirationTime, lastModified, obj = cacheData 
    112     modifiedSince = cherrypy.request.headers.get('If-Modified-Since', None) 
    113     if modifiedSince is not None and modifiedSince == lastModified: 
    114         cherrypy._cache.totNonModified += 1 
    115         cherrypy.response.status = "304 Not Modified" 
    116         cherrypy.response.body = None 
    117     else: 
    118         # serve it & get out from the request 
    119         cherrypy.response.status, cherrypy.response.header_list, body = obj 
    120         cherrypy.response.body = body 
    121117 
    122118def tee_output(): 
  • trunk/cherrypy/test/test_core.py

    r1047 r1057  
    351351        }, 
    352352        '/internalredirect/secure': { 
    353             'auth.on': True, 
     353            'tools.auth.on': True, 
    354354        }, 
    355355        '/error': { 

Hosted by WebFaction

Log in as guest/cpguest to create tickets