diff options
author | Simon Rettberg | 2019-03-07 13:32:30 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-03-07 13:32:30 +0100 |
commit | caf173ab903d993aebdf137f3ca64f1ca73b74dc (patch) | |
tree | 70cc2fa2f4b1d25167a4b0b646b57b57ba78fe1a /modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php | |
parent | [locationinfo] Add error log for backends (diff) | |
download | slx-admin-caf173ab903d993aebdf137f3ca64f1ca73b74dc.tar.gz slx-admin-caf173ab903d993aebdf137f3ca64f1ca73b74dc.tar.xz slx-admin-caf173ab903d993aebdf137f3ca64f1ca73b74dc.zip |
[locationinfo] Introduce timeouts for curl operations
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php')
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php index 809634ad..7f84dd92 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php @@ -174,9 +174,8 @@ class CourseBackend_HisInOne extends CourseBackend private function postToServer($request, $action) { $header = array( - "Content-type: text/xml;charset=\"utf-8\"", - "SOAPAction: \"" . $action . "\"", - "Content-length: " . strlen($request), + 'Content-type: text/xml;charset="utf-8"', + 'SOAPAction: "' . $action . '"', ); if ($this->curlHandle === false) { @@ -191,6 +190,8 @@ class CourseBackend_HisInOne extends CourseBackend CURLOPT_URL => $this->location, CURLOPT_POSTFIELDS => $request, CURLOPT_HTTPHEADER => $header, + CURLOPT_TIMEOUT => 15, + CURLOPT_CONNECTTIMEOUT => 3, ); curl_setopt_array($this->curlHandle, $options); |