aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-16 19:07:19 -0700
committerfriendica <info@friendica.com>2014-09-16 19:07:19 -0700
commitc4608d4c827881b0f0fa5e2031de3fbd5b0568d7 (patch)
treea590f2a9e6774806fa7acfd573790e99cf014875 /include/network.php
parent6a82ccecd08e84dff0f4e3198693823d7019c6d2 (diff)
downloadvolse-hubzilla-c4608d4c827881b0f0fa5e2031de3fbd5b0568d7.tar.gz
volse-hubzilla-c4608d4c827881b0f0fa5e2031de3fbd5b0568d7.tar.bz2
volse-hubzilla-c4608d4c827881b0f0fa5e2031de3fbd5b0568d7.zip
just mark dead hubloc deleted - don't remove them. This could cause problems. Also clean up fetch_url/post_url header option
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/network.php b/include/network.php
index 0191f203d..e84ea91f4 100644
--- a/include/network.php
+++ b/include/network.php
@@ -38,6 +38,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
return false;
@curl_setopt($ch, CURLOPT_HEADER, true);
+ @curl_setopt($ch, CURLINFO_HEADER_OUT, true);
@curl_setopt($ch, CURLOPT_CAINFO, get_capath());
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
@@ -47,11 +48,8 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
if($ciphers)
@curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, $ciphers);
- if (x($opts,'accept_content')){
- @curl_setopt($ch,CURLOPT_HTTPHEADER, array (
- "Accept: " . $opts['accept_content']
- ));
- }
+ if(x($opts,'headers'))
+ @curl_setopt($ch, CURLOPT_HTTPHEADER, $opts['headers']);
if(x($opts,'timeout') && intval($opts['timeout'])) {
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
@@ -166,6 +164,7 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
return ret;
@curl_setopt($ch, CURLOPT_HEADER, true);
+ @curl_setopt($ch, CURLINFO_HEADER_OUT, true);
@curl_setopt($ch, CURLOPT_CAINFO, get_capath());
@curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
@curl_setopt($ch, CURLOPT_POST,1);
@@ -176,12 +175,6 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
if($ciphers)
@curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, $ciphers);
-
- if (x($opts,'accept_content')){
- @curl_setopt($ch,CURLOPT_HTTPHEADER, array (
- "Accept: " . $opts['accept_content']
- ));
- }
if(x($opts,'headers'))
@curl_setopt($ch, CURLOPT_HTTPHEADER, $opts['headers']);