Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50E86D088 for ; Tue, 6 Nov 2012 08:56:18 +0000 (UTC) Received: (qmail 68396 invoked by uid 500); 6 Nov 2012 08:56:17 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 68026 invoked by uid 500); 6 Nov 2012 08:56:16 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 67793 invoked by uid 99); 6 Nov 2012 08:56:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 08:56:15 +0000 Date: Tue, 6 Nov 2012 08:56:15 +0000 (UTC) From: "Dave Cottlehuber (JIRA)" To: dev@couchdb.apache.org Message-ID: <288698977.73544.1352192175769.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (COUCHDB-430) respondWith() called after getRow() does not set "Content-Type" response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Cottlehuber updated COUCHDB-430: ------------------------------------- Assignee: Dave Cottlehuber (was: Chris Anderson) > respondWith() called after getRow() does not set "Content-Type" response > ------------------------------------------------------------------------ > > Key: COUCHDB-430 > URL: https://issues.apache.org/jira/browse/COUCHDB-430 > Project: CouchDB > Issue Type: Bug > Components: JavaScript View Server > Affects Versions: 0.10 > Environment: {"couchdb":"Welcome","version":"0.10.0a796218"} > Linux > Reporter: Rune S. Larsen > Assignee: Dave Cottlehuber > Priority: Minor > > After calling getRow() once, the response header are locked and cannot be changed by respondWith. > getRow() should be side-effect free and Sending shouldn't start before calling send(); > Example, where respondWith() cannot set "Content-Type" response header according to "Accept" request header: > function(head, req){ > var row = getRow(); > respondWith(req, > { > json : function() { > send("{'json'}"); > }, > xml : function() { > send(''); > } > }); > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira