diff --git a/get-dl-tests.sh b/get-dl-tests.sh old mode 100744 new mode 100755 diff --git a/nodejs-get-end.patch b/nodejs-get-end.patch deleted file mode 100644 index c2e5485..0000000 --- a/nodejs-get-end.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 6fd002b4d7ef58e9ea85a04021cde78e43eb4462 -Author: Tom Hughes -Date: Sun Mar 17 17:23:24 2013 +0000 - - Close the original connection when we're done with it - -diff --git a/lib/node-get/node-get.js b/lib/node-get/node-get.js -index 1c84d43..111eed5 100644 ---- a/lib/node-get/node-get.js -+++ b/lib/node-get/node-get.js -@@ -143,12 +143,14 @@ Get.prototype.perform = function(callback, times) { - } else { - this.uri = url.resolve(this.uri, response.headers.location); - } -+ response.connection.end(); - this.perform(callback, times + 1); - return; - } else if (response.statusCode >= 400) { - // failure - var err = new Error('Server returned HTTP ' + response.statusCode); - err.status = response.statusCode; -+ response.connection.end(); - return callback.call(this, err, response); - } else { - // success -@@ -239,6 +241,7 @@ Get.prototype.asString = function(callback) { - case 'application': - case 'image': - case 'video': -+ response.connection.end(); - return callback(new Error("Can't download binary file as string")); - default: - // TODO: respect Content-Transfer-Encoding header diff --git a/nodejs-get-resume.patch b/nodejs-get-resume.patch new file mode 100644 index 0000000..6557d09 --- /dev/null +++ b/nodejs-get-resume.patch @@ -0,0 +1,18 @@ +commit 05a5735327f467f10744336ee6f1eb472bf7f5b4 +Author: Ian Ward +Date: Thu Jun 6 17:02:33 2013 -0400 + + resume the stream for node v0.10 compatiblity + +diff --git a/lib/node-get/node-get.js b/lib/node-get/node-get.js +index 1c84d43..057dc19 100644 +--- a/lib/node-get/node-get.js ++++ b/lib/node-get/node-get.js +@@ -131,6 +131,7 @@ Get.prototype.perform = function(callback, times) { + + var clientrequest = this.request(function handleClientRequest(response, err) { + if (err) return callback.call(this, err, null); ++ response.resume(); + if (response.statusCode >= 300 && + response.statusCode < 400 && + response.headers.location) { diff --git a/nodejs-get.spec b/nodejs-get.spec index 50886ff..bb94095 100644 --- a/nodejs-get.spec +++ b/nodejs-get.spec @@ -2,7 +2,7 @@ Name: nodejs-get Version: 1.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A slightly higher-level HTTP client for node License: BSD @@ -15,8 +15,8 @@ Source1: get-tests-v%{version}.tar.bz2 Source10: get-dl-tests.sh # Accepted upstream - https://github.com/developmentseed/node-get/pull/6 Patch0: nodejs-get-md5.patch -# Offered upstream - https://github.com/developmentseed/node-get/pull/7 -Patch1: nodejs-get-end.patch +# From upstream - https://github.com/developmentseed/node-get/commit/05a5735327f467f10744336ee6f1eb472bf7f5b4 +Patch1: nodejs-get-resume.patch BuildArch: noarch BuildRequires: nodejs-devel @@ -59,6 +59,9 @@ cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/get %changelog +* Fri Jun 7 2013 Tom Hughes - 1.2.1-3 +- Replace local patch with one from upstream + * Tue Apr 30 2013 Tom Hughes - 1.2.1-2 - Add comments to document patches - Increase timeout on tests