Apply patch by Chris Anderson that fixes an edge case in the HTTP view interface resulting in an invalid JSON response body. Closes COUCHDB-84.