You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Nolan Lawson (JIRA)" <ji...@apache.org> on 2015/08/01 23:33:04 UTC
[jira] [Created] (COUCHDB-2765) CouchDB sends 200 and invalid JSON
if _changes view filter is invalid
Nolan Lawson created COUCHDB-2765:
-------------------------------------
Summary: CouchDB sends 200 and invalid JSON if _changes view filter is invalid
Key: COUCHDB-2765
URL: https://issues.apache.org/jira/browse/COUCHDB-2765
Project: CouchDB
Issue Type: Bug
Security Level: public (Regular issues)
Components: Database Core
Reporter: Nolan Lawson
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:
{code}
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'
{code}
Result:
{code}
{"ok":true}
{"ok":true}
{"ok":true,"id":"_design/name","rev":"1-214291b1f3879ad7a5f408d3e1edb53b"}
{"results":[
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
{code}
The final response from CouchDB is this invalid JSON:
{code}
{"results":[
An error has occurred: {"bytesParsed":0,"code":"HPE_INVALID_CHUNK_SIZE"}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)