From 252475e427274fd9bc481975c3acbfce01f30686 Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Thu, 2 Jul 2020 00:15:43 +0300
Subject: [PATCH] Add sample CURL settings and a new proxy option (#1662)

- Includes upgrade to VuFindHttp 3.1.0.
---
 composer.json            |  2 +-
 composer.lock            | 12 ++++++------
 config/vufind/config.ini | 11 ++++++++++-
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/composer.json b/composer.json
index 3aa49f75f87..5eb784ae25f 100644
--- a/composer.json
+++ b/composer.json
@@ -71,7 +71,7 @@
         "vufind-org/vufindcode": "1.2",
         "vufind-org/vufinddate": "1.0.0",
         "vufind-org/vufindharvest": "4.0.1",
-        "vufind-org/vufindhttp": "3.0.0",
+        "vufind-org/vufindhttp": "3.1.0",
         "webfontkit/open-sans": "^1.0",
         "wikimedia/composer-merge-plugin": "1.4.1",
         "wikimedia/less.php": "2.0.0",
diff --git a/composer.lock b/composer.lock
index 4f387a50ba0..6baac412ddb 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "a7c05e41d689747b855906365f7bcda3",
+    "content-hash": "71e38cfbbe2cb880ebdd71890a47607f",
     "packages": [
         {
             "name": "ahand/mobileesp",
@@ -5495,16 +5495,16 @@
         },
         {
             "name": "vufind-org/vufindhttp",
-            "version": "v3.0.0",
+            "version": "v3.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vufind-org/vufindhttp.git",
-                "reference": "26558d9b830bf5cdd5e9a5fbab06df649a5525e7"
+                "reference": "69aff6bcb84139598bdb42d161b7483caf69b1c2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/26558d9b830bf5cdd5e9a5fbab06df649a5525e7",
-                "reference": "26558d9b830bf5cdd5e9a5fbab06df649a5525e7",
+                "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/69aff6bcb84139598bdb42d161b7483caf69b1c2",
+                "reference": "69aff6bcb84139598bdb42d161b7483caf69b1c2",
                 "shasum": ""
             },
             "require": {
@@ -5546,7 +5546,7 @@
             ],
             "description": "VuFind HTTP service library",
             "homepage": "https://vufind.org/",
-            "time": "2020-01-27T20:45:14+00:00"
+            "time": "2020-07-01T10:47:57+00:00"
         },
         {
             "name": "webfontkit/open-sans",
diff --git a/config/vufind/config.ini b/config/vufind/config.ini
index 60d9ed36ab6..006f396f897 100644
--- a/config/vufind/config.ini
+++ b/config/vufind/config.ini
@@ -1312,8 +1312,11 @@ url             = https://www.myendnoteweb.com/EndNoteWeb.html
 ;host = your.proxy.server
 ;port = 8000
 
-; Uncomment following line to set proxy type to SOCKS 5
+; Uncomment one of the following lines to set proxy type to SOCKS 5 or SOCKS 5 with
+; name resolution done by proxy. Setting either of these will make VuFind use the
+; curl adapter for HTTP requests.
 ;type = socks5
+;type = socks5_hostname
 
 ; Default HTTP settings can be loaded here. These values will be passed to
 ; the \Zend\Http\Client's setOptions method.
@@ -1327,6 +1330,12 @@ url             = https://www.myendnoteweb.com/EndNoteWeb.html
 ; that you may also need to install CURL and PHP/CURL packages on your server.
 ;adapter = 'Zend\Http\Client\Adapter\Curl'
 
+; Set curl options if required. See
+; https://www.php.net/manual/en/function.curl-setopt.php for available options and
+; https://github.com/curl/curl/blob/master/include/curl/curl.h for their numeric
+; values.
+;curloptions[52] = true
+
 ; Spelling Suggestions
 ;
 ; Note: These settings affect the VuFind side of spelling suggestions; you
-- 
GitLab