From df416f6006672376b100daa762d86145433c8edd Mon Sep 17 00:00:00 2001 From: webchick <drupal@webchick.net> Date: Fri, 4 Sep 2015 11:37:31 -0700 Subject: [PATCH] Issue #2400407 by hussainweb: Update easyRDF library to latest version --- core/composer.lock | 10 +- core/vendor/composer/installed.json | 128 +++++++++--------- core/vendor/easyrdf/easyrdf/CHANGELOG.md | 25 +--- core/vendor/easyrdf/easyrdf/composer.json | 2 +- .../easyrdf/lib/EasyRdf/Http/Client.php | 9 +- 5 files changed, 84 insertions(+), 90 deletions(-) diff --git a/core/composer.lock b/core/composer.lock index 28f3eb054977..e8495be7b109 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -622,16 +622,16 @@ }, { "name": "easyrdf/easyrdf", - "version": "0.9.0", + "version": "0.9.1", "source": { "type": "git", "url": "https://github.com/njh/easyrdf.git", - "reference": "bb9fd99768d23af0c5b7b55cec5baddc201272b8" + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/njh/easyrdf/zipball/bb9fd99768d23af0c5b7b55cec5baddc201272b8", - "reference": "bb9fd99768d23af0c5b7b55cec5baddc201272b8", + "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", "shasum": "" }, "require": { @@ -680,7 +680,7 @@ "rdfa", "sparql" ], - "time": "2014-11-07 18:02:16" + "time": "2015-02-27 09:45:49" }, { "name": "egulias/email-validator", diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json index 9d4bc9748ece..5cff108de557 100644 --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -196,70 +196,6 @@ "routing" ] }, - { - "name": "easyrdf/easyrdf", - "version": "0.9.0", - "version_normalized": "0.9.0.0", - "source": { - "type": "git", - "url": "https://github.com/njh/easyrdf.git", - "reference": "bb9fd99768d23af0c5b7b55cec5baddc201272b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/njh/easyrdf/zipball/bb9fd99768d23af0c5b7b55cec5baddc201272b8", - "reference": "bb9fd99768d23af0c5b7b55cec5baddc201272b8", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-pcre": "*", - "php": ">=5.2.8" - }, - "require-dev": { - "phpunit/phpunit": "~3.5", - "sami/sami": "~1.4", - "squizlabs/php_codesniffer": "~1.4.3" - }, - "suggest": { - "ml/json-ld": "~1.0" - }, - "time": "2014-11-07 18:02:16", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "EasyRdf_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nicholas Humfrey", - "email": "njh@aelius.com", - "homepage": "http://www.aelius.com/njh/", - "role": "Developer" - }, - { - "name": "Alexey Zakhlestin", - "email": "indeyets@gmail.com", - "role": "Developer" - } - ], - "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", - "homepage": "http://www.easyrdf.org/", - "keywords": [ - "Linked Data", - "RDF", - "Semantic Web", - "Turtle", - "rdfa", - "sparql" - ] - }, { "name": "sebastian/global-state", "version": "1.0.0", @@ -3472,5 +3408,69 @@ "testing", "xunit" ] + }, + { + "name": "easyrdf/easyrdf", + "version": "0.9.1", + "version_normalized": "0.9.1.0", + "source": { + "type": "git", + "url": "https://github.com/njh/easyrdf.git", + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-pcre": "*", + "php": ">=5.2.8" + }, + "require-dev": { + "phpunit/phpunit": "~3.5", + "sami/sami": "~1.4", + "squizlabs/php_codesniffer": "~1.4.3" + }, + "suggest": { + "ml/json-ld": "~1.0" + }, + "time": "2015-02-27 09:45:49", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "EasyRdf_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nicholas Humfrey", + "email": "njh@aelius.com", + "homepage": "http://www.aelius.com/njh/", + "role": "Developer" + }, + { + "name": "Alexey Zakhlestin", + "email": "indeyets@gmail.com", + "role": "Developer" + } + ], + "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", + "homepage": "http://www.easyrdf.org/", + "keywords": [ + "Linked Data", + "RDF", + "Semantic Web", + "Turtle", + "rdfa", + "sparql" + ] } ] diff --git a/core/vendor/easyrdf/easyrdf/CHANGELOG.md b/core/vendor/easyrdf/easyrdf/CHANGELOG.md index 6ac65fb11846..1f772a05d88c 100644 --- a/core/vendor/easyrdf/easyrdf/CHANGELOG.md +++ b/core/vendor/easyrdf/easyrdf/CHANGELOG.md @@ -1,26 +1,13 @@ -EasyRdf 0.9.0 +EasyRdf 0.9.1 ============= -* code-style fix - -EasyRdf 0.9.0-rc.4 -================== - -* fixed compatibility with php < 5.4.8 (see issue #212) -* tweaked unit-tests - -EasyRdf 0.9.0-rc.3 -================== - -* fixed documentation generation - -EasyRdf 0.9.0-rc.2 -================== +Bug Fixes +--------- -* tweaked unit-tests +* Timeout is applied to response-times, not only connection-times (see #202) -EasyRdf 0.9.0-rc.1 -================== +EasyRdf 0.9.0 +============= Major new features ------------------ diff --git a/core/vendor/easyrdf/easyrdf/composer.json b/core/vendor/easyrdf/easyrdf/composer.json index 030e087a96b0..6d0e6ecf90b0 100644 --- a/core/vendor/easyrdf/easyrdf/composer.json +++ b/core/vendor/easyrdf/easyrdf/composer.json @@ -1,7 +1,7 @@ { "name": "easyrdf/easyrdf", "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", - "version": "0.9.0", + "version": "0.9.1", "type": "library", "keywords": ["RDF", "Semantic Web", "Linked Data", "Turtle", "RDFa", "SPARQL"], "homepage": "http://www.easyrdf.org/", diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php index f6b4be8f2431..49f429a2fcdd 100644 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php +++ b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php @@ -422,6 +422,8 @@ public function request($method = null) if (!$socket) { throw new EasyRdf_Exception("Unable to connect to $host:$port ($errstr)"); } + stream_set_timeout($socket, $this->config['timeout']); + $info = stream_get_meta_data($socket); // Write the request $path = $uri['path']; @@ -447,8 +449,13 @@ public function request($method = null) // Read in the response $content = ''; - while (!feof($socket)) { + while (!feof($socket) && !$info['timed_out']) { $content .= fgets($socket); + $info = stream_get_meta_data($socket); + } + + if ($info['timed_out']) { + throw new EasyRdf_Exception("Request to $host:$port timed out"); } // FIXME: support HTTP/1.1 100 Continue -- GitLab