You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Rune S. Larsen (JIRA)" <ji...@apache.org> on 2009/07/23 12:19:14 UTC
[jira] Created: (COUCHDB-430) respondWith() called after getRow()
does not set "Content-Type" response
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
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('<?xml version="1.0" encoding="UTF-8"?>');
}
});
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-430) respondWith() called after getRow()
does not set "Content-Type" response
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Joseph Davis updated COUCHDB-430:
--------------------------------------
Skill Level: Regular Contributors Level (Easy to Medium)
> 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: Chris Anderson
> 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('<?xml version="1.0" encoding="UTF-8"?>');
> }
> });
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (COUCHDB-430) respondWith() called after getRow()
does not set "Content-Type" response
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt reassigned COUCHDB-430:
------------------------------------
Assignee: 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: Chris Anderson
> 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('<?xml version="1.0" encoding="UTF-8"?>');
> }
> });
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.