couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r660170 - in /incubator/couchdb/trunk/share/www/script: couch.js jquery.couch.js
Date Mon, 26 May 2008 11:51:45 GMT
Author: cmlenz
Date: Mon May 26 04:51:44 2008
New Revision: 660170

URL: http://svn.apache.org/viewvc?rev=660170&view=rev
Log:
Fixes to the XHR/Javascript code to be compatible with HTTP/1.0 proxies. Closes COUCHDB-40.

Modified:
    incubator/couchdb/trunk/share/www/script/couch.js
    incubator/couchdb/trunk/share/www/script/jquery.couch.js

Modified: incubator/couchdb/trunk/share/www/script/couch.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch.js?rev=660170&r1=660169&r2=660170&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/couch.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/couch.js [utf-8] Mon May 26 04:51:44 2008
@@ -218,6 +218,6 @@
       req.setRequestHeader(headerName, headers[headerName]);
     }
   }
-  req.send(options.body || null);
+  req.send(options.body || "");
   return req;
 }

Modified: incubator/couchdb/trunk/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/jquery.couch.js?rev=660170&r1=660169&r2=660170&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Mon May 26 04:51:44 2008
@@ -40,7 +40,9 @@
         compact: function(options) {
           options = options || {};
           $.ajax({
-            type: "POST", url: this.uri + "_compact", dataType: "json",
+            type: "POST", url: this.uri + "_compact",
+            contentType: "application/json",
+            dataType: "json", data: "", processData: false, 
             complete: function(req) {
               var resp = $.httpData(req, "json");
               if (req.status == 202) {
@@ -56,7 +58,8 @@
         create: function(options) {
           options = options || {};
           $.ajax({
-            type: "PUT", url: this.uri, dataType: "json",
+            type: "PUT", url: this.uri, contentType: "application/json",
+            dataType: "json", data: "", processData: false, 
             complete: function(req) {
               var resp = $.httpData(req, "json");
               if (req.status == 201) {
@@ -149,8 +152,8 @@
           }
           $.ajax({
             type: method, url: uri + encodeOptions(options),
-            dataType: "json", data: toJSON(doc),
             contentType: "application/json",
+            dataType: "json", data: toJSON(doc),
             complete: function(req) {
               var resp = $.httpData(req, "json")
               doc._id = resp.id;



Mime
View raw message