Ticket #344 (defect)
Opened 3 years ago
Last modified 2 years ago
VirtualHostFilter broke in 229 and needs total rewrite
Status: closed (fixed)
| Reported by: | fumanchu | Assigned to: | fumanchu |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.2-beta |
| Component: | CherryPy code | Keywords: | virtual host |
| Cc: |
Whatever the virtualhostfilter used to do, it doesn't do it now (sorry about that). It needs to inspect the "Host" request header (available in cherrypy.request.base) and dispatch to a new path based on that.
Change History
10/11/05 14:41:15: Modified by fumanchu
10/13/05 10:48:32: Modified by rdelon
Well, I thought about it and I agree that for now we can just change the virtualHostFilter so that we don't need canonical URLs configuration like I suggested here: http://groups.google.com/group/cherrypy-users/browse_thread/thread/f393540fe278e54d/7948aee2b706860d#7948aee2b706860d
Obviously we need to change the way the virtualHostFilter is configured.
Remi.
10/21/05 07:38:51: Modified by rdelon
- milestone changed from 2.1-final to 2.2-beta.
Leaving the filter as is for 2.1-final and moving this ticket for 2.2-beta
10/21/05 12:57:10: Modified by fumanchu
- status changed from new to assigned.
11/02/05 15:06:55: Modified by fumanchu
This is more difficult to implement now that the builtin filters are expected to be configured entirely via cherrypy.config. It needs a dict for what used to be the siteMap (mapping Host headers to virtual roots), but if you try to use the shortcut syntax for the global bucket and write:
cherrypy.config.update( {'virtualHostFilter.siteMap': {'www.mydom1.com': '/mydom'} })
...then it won't be placed in the global bucket. It'll be inserted as if you had written, in the config file:
[virtualHostFilter.siteMap] www.mydom1.com: "/mydom"
This functionality might be better implemented in the core instead of in a filter.
12/27/05 15:17:23: Modified by fumanchu
- status changed from assigned to closed.
- resolution set to fixed.
Fixed in [883].


OK, maybe it happened in [202]. But the effect is the same; it used to inspect the Host header and doesn't now.