Unable to redirect from _list function
--------------------------------------

                 Key: COUCHDB-513
                 URL: https://issues.apache.org/jira/browse/COUCHDB-513
             Project: CouchDB
          Issue Type: Bug
          Components: JavaScript View Server
    Affects Versions: 0.11
         Environment: Mac OS X 10.5.8, Erlang OTP/R12B, CouchDB/0.11.0a9fd42dc1
            Reporter: Zachary Zolton
            Priority: Minor


Define this _list function:

function(head, req) {
 return {
   'code': 301,
   'headers': { 'Location': 'http://www.google.com/' }
 };
}

Try to curl it:

$ curl -i 
'http://localhost:5984/db/_design/ddoc/_list/test-redirect/some-view?key=%22foo%22'
HTTP/1.1 200 OK
Vary: Accept
Transfer-Encoding: chunked
Server: CouchDB/0.11.0a9fd42dc1-git (Erlang OTP/R12B)
Etag: "46014W5JDRLKZF5SECP2D44YH"
Date: Thu, 24 Sep 2009 22:23:14 GMT
Content-Type: application/json

curl: (56) Received problem 2 in the chunky parser


Here is Jan's take on the user mailing list:

http://mail-archives.apache.org/mod_mbox/couchdb-user/200909.mbox/%3c6678e46d-a113-4052-9f44-e061582d2...@apache.org%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to