is this fixed?
----- Forwarded Message ---- From: Justin Davis <[EMAIL PROTECTED]> To: web.py <[email protected]> Sent: Monday, October 27, 2008 6:08:40 PM Subject: [webpy] Re: subdomain applications not working with more than one mapping This is a bug. The subdomain applications try to match on themselves, when they really want to match on their sub-domains. Anand, could you look into this? Here's a patch that fixes this: diff --git a/web/application.py b/web/application.py index 75f6a3b..2b10ad7 100755 --- a/web/application.py +++ b/web/application.py @@ -479,8 +479,10 @@ class subdomain_application(application): """ def handle(self): host = web.ctx.host.split(':')[0] #strip port - fn, args = self._match(self.mapping, host) - return self._delegate(fn, self.fvars, args) + app = self._match(self.mapping, host) + if app: + return app.handle() + raise notfound def _match(self, mapping, value): for pat, what in utils.group(mapping, 2): @@ -490,8 +492,8 @@ class subdomain_application(application): result = utils.re_compile('^' + pat + '$').match(value) if result: # it's a match - return what, [x and urllib.unquote(x) for x in result.groups()] - return None, None + return what + return None class combine_applications(application): On Oct 25, 2:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > if i have a mapping like this: > mapping = ( > "www.XX.com", xx_app, > ) > it works fine. > > but if i add one more subdomain like this > > mapping = ( > "www.XX.com", xx_app, > "www.YY.com", yy_app, > ) > app = web.subdomain_application(mapping) > > it just returns 404 not found for all urls of both domain XX and YY --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
