CouchDB
  1. CouchDB
  2. COUCHDB-1101

Headers from update handler not returned when a document is created/modified

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: None
    • Component/s: HTTP Interface
    • Labels:
      None
    • Environment:

      Fedora 14, 4 Cores, 4 GB RAM

      Description

      I expect from this update handler to return "X-my-header" header in response. It does not.

      function(doc,req) {
      var resp = { "headers" :

      { "X-my-header": "application" }

      , "body": "" };
      return [{_id:req.uuid}, resp];
      }

      Changing the return to:

      return [null, resp];

      helps.

        Activity

        Hide
        Robert Newson added a comment -

        There's no need to 'bump' an issue. Please only post if you have additional information or a working patch. We are aware of all open issues.

        Show
        Robert Newson added a comment - There's no need to 'bump' an issue. Please only post if you have additional information or a working patch. We are aware of all open issues.
        Hide
        Marcos Zanona added a comment - - edited

        As far as I can see Jonathan already posted a patch on February https://issues.apache.org/jira/browse/COUCHDB-648?focusedCommentId=12990936&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12990936 .

        I performed few tests with his patch and it not only adds the possibility to use the status `code` within the response object as it maintains the whole header as it was supposed to be. I seems to work really well

        Please consider adding this to the trunk.

        Show
        Marcos Zanona added a comment - - edited As far as I can see Jonathan already posted a patch on February https://issues.apache.org/jira/browse/COUCHDB-648?focusedCommentId=12990936&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12990936 . I performed few tests with his patch and it not only adds the possibility to use the status `code` within the response object as it maintains the whole header as it was supposed to be. I seems to work really well Please consider adding this to the trunk.
        Hide
        Alexander Shorin added a comment -

        Fixed in 74613f5 as part of COUCHDB-648

        Show
        Alexander Shorin added a comment - Fixed in 74613f5 as part of COUCHDB-648

          People

          • Assignee:
            Unassigned
            Reporter:
            Jiri Sedlacek
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development