couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Vander Wilt (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1330) provides() does not supports returning a status code or headers
Date Fri, 24 Feb 2012 19:35:48 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215843#comment-13215843
] 

Nathan Vander Wilt commented on COUCHDB-1330:
---------------------------------------------

This regression was introduced by https://github.com/apache/couchdb/commit/92f70219ce5ba487e4eb65dea7d16a9168a8547f#share/server/render.js
for [#COUCHDB-1272] and also breaks returning "json" instead of "body". Jason's patch looks
good to me for fixing it, and I'd love to see it applied soon.
                
> provides() does not supports returning a status code or headers
> ---------------------------------------------------------------
>
>                 Key: COUCHDB-1330
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1330
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 1.1.1
>         Environment: Iris Couch
>            Reporter: Jason Smith
>            Priority: Minor
>         Attachments: A_0001-Support-provides-callbacks-indicating-status-code-an.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> An Iris Couch user lost the ability to redirect from a provides() callback in a show
function: http://getsatisfaction.com/iriscouch/topics/_provides_method_not_returning_code_and_headers
> This show function no longer works:
> function (doc, req) {
>     provides('html', function () {
>         return {
>             headers: { Location: 'http://www.iriscouch.com' },
>             code: 302,
>             body: 'Redirecting to IrisCouch website...'
>         };
>     });   
> }
> This looks like a regression from 1.1.0; although there are no unit tests so perhaps
strictly speaking it was unsupported functionality. Git bisect places the error at the patch
to COUCHDB-1272.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message