On Mon, Feb 10, 2014 at 10:45:00AM -0800, Jonathan Vanasco wrote: > hoping someone has a suggestion... > > we run `pyramid.view.append_slash_notfound_view` as a convenience for > people writing in bad urls. > > on one of our newer views, we need to raise an "authoritative" 404. ie, > "This is a 404 , do not add a slash"
I don't really follow the rest of your explanation (below), so maybe this is not what you are after, but: I think if you *return* an HTTPNotFound response from your view (rather than raising it), pyramid will return that response verbatim without invoking its notfound view. > this is because of 2 reasons: > > 1. It's definitely a 404. (this has do deal with invalid subdomains that > are mapped to a multiple level url ) > 2. when it is adding slash, because we do url rewriting on the proxy level, > the redirect is going to the unmasked path > > for example: > > myNewWebsite.com > > gets mapped to > > app.com/apps/myNewWebsite > > if we 404 within this controller... > > HttpFound( app.com/apps/myNewWebsite/ ) > > and not > > HttpFound( myNewWebsite.com/ ) > > it makes perfect sense why Pyramid is doing this. just looking for ideas > on how to best handle this. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
