You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by rnewson <gi...@git.apache.org> on 2016/12/01 15:22:49 UTC

[GitHub] couchdb-chttpd pull request #151: Merge default update response headers with...

GitHub user rnewson opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/151

    Merge default update response headers with custom ones

    This was not ported to chttpd and so wasn't really fixed in 2.0
    
    COUCHDB-1447

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-chttpd 1447-merge-headers-2.0

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/151.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #151
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-chttpd pull request #151: Merge default update response headers with...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-chttpd/pull/151


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-chttpd issue #151: Merge default update response headers with custom...

Posted by nickva <gi...@git.apache.org>.
Github user nickva commented on the issue:

    https://github.com/apache/couchdb-chttpd/pull/151
  
    +1
    
    ```
    In [15]: fun2 = '''function(doc, req){ return [doc, {headers:
        ...: {'Content-Type': 'text/blah'}
        ...:
        ...: , 'body': '<h1>test</h1>'}]}'''
    
    In [16]: doc2 = {"updates": {"doc":fun2}}
    
    In [17]: d['_design/dump2'] = doc2
    ```
    
    then saw custom header and NewRev
    
    ```
     curl -v -X PUT http://localhost:15984/d/_design/dump2/_update/doc/foo
    *   Trying ::1...
    * connect to ::1 port 15984 failed: Connection refused
    *   Trying 127.0.0.1...
    * Connected to localhost (127.0.0.1) port 15984 (#0)
    > PUT /d/_design/dump2/_update/doc/foo HTTP/1.1
    > Host: localhost:15984
    > User-Agent: curl/7.43.0
    > Accept: */*
    >
    < HTTP/1.1 201 Created
    < Content-Length: 13
    < Content-Type: text/blah
    < Date: Thu, 01 Dec 2016 15:46:30 GMT
    < Server: CouchDB/2.0.0-d9b51a0 (Erlang OTP/18)
    < X-Couch-Id: foo
    < X-Couch-Request-ID: 549d61e9e7
    < X-Couch-Update-NewRev: 3-825cb35de44c433bfb2df415563a19de
    < X-CouchDB-Body-Time: 0
    <
    * Connection #0 to host localhost left intact
    <h1>test</h1>
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---