On Thu, 2011-08-04 at 17:40 +0200, Eric Lemoine wrote:
> >> Shouldn't Pyramid be able to generate paths, as opposed to URLs, for
> >> static resources? Fowarding the Host header doesn't sound like a good
> >> solution, as you'll run into issues if you have (Apache) virtual hosts
> >> on the backend server.
> >
> > I don't really know what issues you would run into.  I'm just talking
> > about a setup where there's one front end web server talking to some
> > number of Pyramid appservers.  You can get arbitrarily more complex than
> > that obviously, at your own peril, and maybe passing the Host header
> > along in some other complex setup might be some sort of issue (but I
> > can't imagine one).
> 
> If you have multiple virtual hosts on the backend server then Apache
> will determine which virtual host is the target by looking at the Host
> header. If the Host header is set to the name of the proxy server then
> Apache won't be able to determine the target virtual host.

In what configuration would it be sane to have any proxy set the Host
header to anything except what the client user agent says the Host
header is?

> > If the next question is "why would I ever generate URLs with the scheme
> > and hostname in them", the answer is because sometimes you want to
> > generate URLs to a particular hostname or using a particular scheme (see
> > the app_url arg to route_url).
> 
> That I understand.
> 
> What I don't understand is why Pyramid provides route_path but not 
> static_path.

I didn't read that in your mail, sorry.  Indeed there is no
"static_path".  It'd be reasonably easy to add one (static_url is really
just a wrapper around route_url).  I'd probably add one, I guess if only
not to have to have this conversation again ;-)

- C


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to