couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject handling 404 errors in shows function
Date Thu, 04 Feb 2010 17:55:21 GMT
Since latest changes in view serverr, we can't handle 404 errors in
show docs. Reason invoked by @jchris is that most of users won't have
the use for it and it will raise 500 error in case they don't handle
case where the doc doesn't exist.

But this feature could be very useful in some cases :

- wiki
- doc redirection
- ...

The best advantage is that it allows us via the rewriter to have clean
url and 404 handling without using ajax and pseudo urls via fragments
and javascript.

I've written a new version of couch.it that heavily use that. I'm all
for it goes back. @jchris proposed to make it optional which sound
fine. I've written a patch against latest trunk that exactly does that
:

https://issues.apache.org/jira/browse/COUCHDB-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel


(where discussion started too). The patch test if "show_handle_404"
property in the design doc exists and is equal to true and only in
this case allow shows function to manage 404. In all other cases, a
404 error is returned if the doc doesn't exist.

Are you ok with this patch ?

- benoƮt

Mime
View raw message