Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
If you provide a view with filter=_view in _changes and the referenced view is a design doc with no map function, then the database returns a 200 with invalid JSON.
cURL to reproduce:
curl 'http://127.0.0.1:5984/testdb/' -X DELETE -H 'Content-Type: application/json' -H 'Accept: application/json' curl 'http://127.0.0.1:5984/testdb/' -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' curl 'http://127.0.0.1:5984/testdb/_design/name' -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' --data-binary '{"_id":"_design/name","views":{"name":{"empty":"sad face"}}}' curl 'http://127.0.0.1:5984/testdb/_changes?timeout=25000&feed=longpoll&filter=_view&view=name%2Fname&since=0&limit=25&_nonce=1438464395669' -H 'Accept: application/json'
Result:
{"ok":true} {"ok":true} {"ok":true,"id":"_design/name","rev":"1-214291b1f3879ad7a5f408d3e1edb53b"} {"results":[ curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
The final response from CouchDB is this invalid JSON:
{"results":[ An error has occurred: {"bytesParsed":0,"code":"HPE_INVALID_CHUNK_SIZE"}