Bug #76684 [Opn]: Curl BC break with CURLOPT_URL with domain relative url
| From: | cmb@php.net | Date: | Mon, 30 Jul 2018 13:09:12 +0000 |
| Subject: | Bug #76684 [Opn]: Curl BC break with CURLOPT_URL with domain relative url | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216524@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76684&edit=1
ID: 76684
Updated by: cmb@php.net
Reported by: maggus dot staab+php at googlemail dot com
Summary: Curl BC break with CURLOPT_URL with domain relative
url
Status: Open
Type: Bug
Package: cURL related
PHP Version: 7.2.8
Block user comment: N
Private report: N
New Comment:
# php -v
PHP 5.6.15 (cli) (built: Oct 29 2015 12:40:36)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
# php 76684.php
string(15) "<url> malformed"
Previous Comments:
------------------------------------------------------------------------
[2018-07-30 12:14:07] maggus dot staab+php at googlemail dot com
Description:
------------
when using domain relative urls with curl, this worked on php5 and also on php7.0
we are in the process of testing our software with php7.2 and see that we get a error in this case
"<url> malformed".
I agree using the CURLOPT_URL option without absolute urls is not ideal, but since it worked in the
past I would at least not expect a BC break with this behaviour in the php7.* series
Test script:
---------------
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '/mytest');
curl_exec($ch);
$error = '';
if (curl_errno($ch) != 0) {
$error = curl_error($ch);
}
var_dump($error);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76684&edit=1