On 5/7/07, Philip Jenvey <[EMAIL PROTECTED]> wrote:
>
> On May 7, 2007, at 3:32 PM, Shannon -jj Behrens wrote:
>
> > Hi,
> >
> > I'm looking at the documentation for PrefixMiddleware.  It should
> > probably be updated to talk about the case when you're *not* using a
> > prefix such as "/james" but when you're instead proxying different
> > subdomains to different different applications under Apache.
> >
> > It looks like:
> >
> > filter-with = proxy-prefix
> >
> > [filter:proxy-prefix]
> > use = egg:PasteDeploy#prefix
> > force_port = true
> > prefix =
> >
> > Setting "prefix =" was somewhat weird.  I would have thought leaving
> > it out would have done the right thing and defaulted to "", but
> > instead it defaults to "/" which results in URLs that look like
> > "//mycontroller".
> >
> > Does this email make any sense?  I'm not sure ;)
> >
>
> Is this with the latest PasteDeploy? As of 1.1 the PrefixMiddleware
> constructor does:

I'm using PasteDeploy 1.3.

>      def __init__(self, app, global_conf=None, prefix='/',
>                   translate_forwarded_server=True,
>                   force_port=None, scheme=None):
>          self.app = app
>          self.prefix = prefix.rstrip('/')
>
> so prefix='' should be equiv. to the default prefix='/'

I printed out self.prefix in that code after:

a) Not specifying prefix at all in my .ini.

b) Setting "prefix = " in my .ini.

In both cases, self.prefix is ''.  I guess that's not bad.  I think it
*use* to be the case that if you didn't specify a prefix, you'd end up
with '/' which resulted in absolute URLs that looked like '//login'.

Hmm,
-jj

-- 
http://jjinux.blogspot.com/

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to