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

Changeset 158

Show
Ignore:
Timestamp:
04/24/05 11:25:37
Author:
rdelon
Message:

Fixed ticket #104. Handle %20 (and others) in static path; added a test about static content

Files:

Legend:

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

    r156 r158  
    306306 
    307307    path = cpg.request.path 
    308     if path.startswith('/'): path = path[1:] # Remove leading slash 
    309     if path.endswith('/'): path = path[:-1] # Remove trailing slash 
     308    if path.startswith('/'): 
     309        # Remove leading slash 
     310        path = path[1:] 
     311    if path.endswith('/'): 
     312        # Remove trailing slash 
     313        path = path[:-1] 
     314    path = urllib.unquote(path) # Replace quoted chars (eg %20) from url 
    310315 
    311316    # Handle static directories 
  • trunk/cherrypy/test/helper.py

    r150 r158  
    141141    modeList=[('r',''), ('tp', 'threadPool=3')] 
    142142    for mode,modeConfig in modeList: 
    143         f=open("testsite.cfg", "w") 
     143        f = open("testsite.cfg", "w") 
    144144        f.write(extraConfig) 
    145145        f.write(''' 
  • trunk/cherrypy/test/test.py

    r156 r158  
    102102 
    103103testList = [ 
     104    'testStaticContent', 
    104105    'testObjectMapping', 
    105106    'testFilter1', 
     
    167168    print "**** THE ABOVE TESTS FAILED" 
    168169    print 
    169     print "**** Some errors occured: please add a ticket in our Trac system (http://trac.cherrypy.org/newticket) with the output of this test script" 
     170    print "**** Some errors occured: please add a ticket in our Trac system (http://www.cherrypy.org/newticket) with the output of this test script" 
    170171 
    171172else: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets