Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 72112 invoked from network); 24 Jan 2009 11:49:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2009 11:49:05 -0000 Received: (qmail 94407 invoked by uid 500); 24 Jan 2009 11:49:05 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 94321 invoked by uid 500); 24 Jan 2009 11:49:04 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 94312 invoked by uid 99); 24 Jan 2009 11:49:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 03:49:04 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 11:49:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BC1E82388999; Sat, 24 Jan 2009 11:48:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r737335 - /couchdb/trunk/src/couchdb/couch_js.c Date: Sat, 24 Jan 2009 11:48:42 -0000 To: commits@couchdb.apache.org From: jan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090124114842.BC1E82388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;