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

Ticket #371 (defect)

Opened 3 years ago

Last modified 2 years ago

mapPathToObject should use browserUrl instead of path

Status: closed (fixed)

Reported by: fumanchu Assigned to: fumanchu
Priority: normal Milestone: 3.0
Component: CherryPy code Keywords:
Cc:

_cphttptools.mapPathToObject has the following code:

    if isFirst:
        # We found the extra ".index"
        # Check if the original path had a trailing slash (otherwise, do
        #   a redirect)
        if path[-1] != '/':
            newUrl = path + '/'
            if cherrypy.request.queryString:
                newUrl += "?" + cherrypy.request.queryString
            if getattr(cherrypy, "debug", None):
                cherrypy.log("    Found: redirecting to %s" % newUrl, "DEBUG")
            raise cherrypy.HTTPRedirect(newUrl)

It should probably use request.browserUrl instead of path to set newUrl.

Change History

10/27/05 18:08:22: Modified by fumanchu

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in trunk in [755]. Once stable, needs porting to 2.1 branch.

02/15/06 21:34:14: Modified by 瑞丰注册香港公司

  • version set to devel.
  • milestone set to 3.0.

08/28/06 02:56:10: Modified by fumanchu

  • cc deleted.
  • keywords deleted.
  • summary changed from 香港特区公司注册登记(瑞丰会计师事务所) to mapPathToObject should use browserUrl instead of path.

Hosted by WebFaction

Log in as guest/cpguest to create tickets