You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2009/01/24 12:48:42 UTC
svn commit: r737335 - /couchdb/trunk/src/couchdb/couch_js.c
Author: jan
Date: Sat Jan 24 11:48:42 2009
New Revision: 737335
URL: http://svn.apache.org/viewvc?rev=737335&view=rev
Log:
Make command line test suite succeed again. Patch by Bob Dionne.
Closes COUCHDB-212. Thanks Bob.
Modified:
couchdb/trunk/src/couchdb/couch_js.c
Modified: couchdb/trunk/src/couchdb/couch_js.c
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_js.c?rev=737335&r1=737334&r2=737335&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_js.c (original)
+++ couchdb/trunk/src/couchdb/couch_js.c Sat Jan 24 11:48:42 2009
@@ -616,6 +616,7 @@
curl_easy_setopt(handle,CURLOPT_WRITEHEADER,b);
curl_easy_setopt(handle,CURLOPT_URL,url);
curl_easy_setopt(handle,CURLOPT_HTTPGET,1);
+ curl_easy_setopt(handle,CURLOPT_FOLLOWLOCATION,1);
curl_easy_setopt(handle,CURLOPT_NOPROGRESS,1);
curl_easy_setopt(handle,CURLOPT_IPRESOLVE,CURL_IPRESOLVE_V4);
@@ -864,8 +865,12 @@
b_data->pos = 0;
data = JSValToChar(context,(argv+1));
+ readlen = strlen(data);
+
+
+
// TODO: remove strlen
- append_Buffer(b_data->buffer,data,strlen(data));
+ append_Buffer(b_data->buffer,data,readlen);
free(data);
@@ -887,6 +892,9 @@
curl_easy_setopt(handle,CURLOPT_READDATA,b_data);
curl_easy_setopt(handle,CURLOPT_URL,url);
curl_easy_setopt(handle,CURLOPT_UPLOAD,1);
+ curl_easy_setopt(handle,CURLOPT_INFILESIZE,readlen);
+
+
// Curl structure
struct curl_slist *slist = generateCurlHeaders(context,argv+2);
@@ -900,6 +908,8 @@
// Use only ipv4
curl_easy_setopt(handle,CURLOPT_IPRESOLVE,CURL_IPRESOLVE_V4);
+
+
// Perform
int exitcode;