CouchDB
  1. CouchDB
  2. COUCHDB-1330

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: JavaScript View Server
    • Labels:
      None
    • Environment:

      Iris Couch

    • Skill Level:
      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Smith
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

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

                Development