diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-03-02 14:29:49 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-03-02 14:29:49 +0100 |
commit | 51c8aca5a82ba80f36fe34ac4679a99d6c7d3ff6 (patch) | |
tree | 17e98613f57baaba8e9a4ba4f6cbff9f5867c139 /copylib | |
parent | 691d5288fca46ced4ffd391229660969355c875b (diff) |
fix url concatenation
Diffstat (limited to 'copylib')
-rw-r--r-- | copylib/merchants.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/copylib/merchants.php b/copylib/merchants.php index fddbda85..1ae763c9 100644 --- a/copylib/merchants.php +++ b/copylib/merchants.php @@ -143,9 +143,8 @@ function generate_contract($amount_value, * Feed `$json` to the backend and return the "(pecl) http response object" * corresponding to the `$backend_relative_url` call */ -function give_to_backend($backend_host, $backend_relative_url, $json){ - $url = (new http\URL("http://$backend_host")) - ->mod(array ("path" => $backend_relative_url), http\Url::JOIN_PATH); +function give_to_backend($backend_relative_url, $json){ + $url = url_join("http://".$_SERVER["HTTP_HOST"], $backend_relative_url); $req = new http\Client\Request("POST", $url, |