public
Fork of jlindley/couchdb
Description: General workspace for CouchDB experiments.
Homepage: http://couchdb.org/
Clone URL: git://github.com/jchris/couchdb.git
got action server tests passing with new line protocol
jchris (author)
Fri Jul 18 13:26:47 -0700 2008
commit  7783b8bff1b9b113f7cd28480b4041a48c5f7fd8
tree    d248c117d3f4ea3e4d8b19ecdb47ffb42f358d00
parent  85fbcc0d8d7d1158c2da4f5f8e388cb475ff314b
...
364
365
366
367
 
368
369
370
371
 
372
373
374
...
364
365
366
 
367
368
369
370
 
371
372
373
374
0
@@ -364,11 +364,11 @@ while (line = readline()) {
0
       var resp = process(request);
0
 
0
       if (resp.json) {
0
- respond({"status" : (resp.status || 200), "json" : resp.json, "headers" : resp.headers});
0
+ respond({"status" : (resp.status || 200), "json" : resp.json, "headers" : resp.headers || {}});
0
       } else if (resp.body) {
0
           var responseObject = {"status" : (resp.status || 200),
0
                                 "body" : resp.body,
0
- "headers" : resp.headers};
0
+ "headers" : resp.headers || {}};
0
         respond(responseObject);
0
       } else {
0
         throw({"error" : "bad_action_function", "reason" : "Action response must have 'json' or 'body' key."});

Comments

    No one has commented yet.