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

Changeset 946

Show
Ignore:
Timestamp:
01/26/06 15:40:17
Author:
fumanchu
Message:

Fixes for header.elements now returning [] instead of None.

Files:

Legend:

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

    r916 r946  
    1414        if not enc: 
    1515            ct = cherrypy.request.headers.elements("Content-Type") 
    16             if ct is not None
     16            if ct
    1717                ct = ct[0] 
    1818                enc = ct.params.get("charset", None) 
  • trunk/cherrypy/filters/encodingfilter.py

    r917 r946  
    1212         
    1313        ct = cherrypy.response.headers.elements("Content-Type") 
    14         if ct is not None
     14        if ct
    1515            ct = ct[0] 
    1616            if ct.value.lower().startswith("text/"): 
     
    7272     
    7373    encs = cherrypy.request.headerMap.elements('Accept-Charset') 
    74     if encs is None
     74    if not encs
    7575        # Any character-set is acceptable. 
    7676        charsets = [] 
  • trunk/cherrypy/filters/gzipfilter.py

    r856 r946  
    3232        from cherrypy.lib import httptools 
    3333        acceptable = cherrypy.request.headers.elements('Accept-Encoding') 
    34         if acceptable is None: 
     34        if not acceptable: 
    3535            # If no Accept-Encoding field is present in a request, 
    3636            # the server MAY assume that the client will accept any 

Hosted by WebFaction

Log in as guest/cpguest to create tickets