Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1330

provides() does not supports returning a status code or headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.1.1
    • None
    • JavaScript View Server
    • None
    • Iris Couch

    • New Contributors Level (Easy)

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jhs Jason Smith
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified