Edit report at https://bugs.php.net/bug.php?id=63488&edit=1

 ID:                 63488
 Updated by:         fel...@php.net
 Reported by:        kf at sumptuouscapital dot com
 Summary:            CURLOPT_RESOLVE not defined
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            HTTP related
 Operating System:   GNU/Linux
 PHP Version:        5.4.8
-Assigned To:        
+Assigned To:        pierrick
 Block user comment: N
 Private report:     N

 New Comment:

Such feature has been implemented in master branch only.


Previous Comments:
------------------------------------------------------------------------
[2012-11-11 18:27:52] kf at sumptuouscapital dot com

Please disregard the part about the functionality working as expected, it does 
not use the provided information, just worked out in earlier testing due to 
circumstance. Due to this I'm flagging it as a bug rather than a RFE

------------------------------------------------------------------------
[2012-11-11 18:01:45] kf at sumptuouscapital dot com

Description:
------------
Since curl 7.21.3 curl_easy_setopt has an option CURLOPT_RESOLVE [0]. Using 
this option from within PHP results in the following NOTICE and WARNING. Usage 
of this functionality is necessary for proper Sever Name Indication for 
verifying CA Certs in certain scenarios. The actual functionality presented by 
this option seems to work despite the notice and warning. 

The notice is: 

PHP Notice:  Use of undefined constant CURLOPT_RESOLVE - assumed 
'CURLOPT_RESOLVE' in /var/www/localhost/htdocs/status-srv/sks_get_peer_data.php 
on line 351

This Notice can be removed by explicitly setting a string rather than using it 
as a constant, however, the following Warning is still presented in both 
scenarios: 

Warning: curl_setopt() expects parameter 2 to be long, string given in 
/var/www/localhost/htdocs/status-srv/sks_get_peer_data.php on line 351

[0] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

Test script:
---------------
<?php
// Minimum working example to produce the reported behavior
$ch = curl_init("https://www.google.com:80/";);
curl_setopt($ch, CURLOPT_RESOLVE, "google.com:80:173.194.32.5");
curl_exec($ch);
?>

Expected result:
----------------
No warning

Actual result:
--------------
works, but with notice and warning output. 


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63488&edit=1

Reply via email to