aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOlaf Conradi <olaf@conradi.org>2012-12-26 16:30:19 +0100
committerOlaf Conradi <olaf@conradi.org>2012-12-26 16:30:19 +0100
commit7f13baf367e53a4222c068d81557d6618e6292ff (patch)
tree6fd0a056a87f001fd0643728b88cab117258a048 /include
parentcb46f7b2279223cadda1b9b1530e3a104f3592f1 (diff)
downloadvolse-hubzilla-7f13baf367e53a4222c068d81557d6618e6292ff.tar.gz
volse-hubzilla-7f13baf367e53a4222c068d81557d6618e6292ff.tar.bz2
volse-hubzilla-7f13baf367e53a4222c068d81557d6618e6292ff.zip
Same applies for 307
308 spec mentions 307 must not rewrite POST to GET
Diffstat (limited to 'include')
-rw-r--r--include/network.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index 2180e44aa..6ef1c2605 100644
--- a/include/network.php
+++ b/include/network.php
@@ -172,7 +172,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0)
if (isset($url_parsed)) {
$redirects++;
@curl_close($ch);
- if($http_code == 308) {
+ if($http_code == 307 || $http_code == 308) {
return post_url($newurl,$params,$redirects,$timeout);
} else {
return fetch_url($newurl,false,$redirects,$timeout);
@@ -355,9 +355,10 @@ function z_post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0
if (isset($url_parsed)) {
$redirects++;
curl_close($ch);
- if($http_code == 308) {
+ if($http_code == 307 || $http_code == 308) {
return z_post_url($newurl,$params,$headers,$redirects,$timeout);
} else {
+ logger("params=".print_r($params, true));
return z_fetch_url($newurl,false,$headers,$redirects,$timeout);
}
}