couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-430) respondWith() called after getRow() does not set "Content-Type" response
Date Mon, 12 Nov 2012 18:35:12 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495482#comment-13495482
] 

Jan Lehnardt commented on COUCHDB-430:
--------------------------------------

+1

I made you a 430-fix-content-type-for-lists-after-get-row

https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=log;h=refs/heads/430-fix-content-type-for-lists-after-get-row

                
> 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
>             Fix For: 1.3
>
>         Attachments: 20121106_github_pr_18.diff
>
>
> 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('<?xml version="1.0" encoding="UTF-8"?>');
> 		}
> 	});
> }

--
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

Mime
View raw message