Req->Bug #63488 [Opn]: CURLOPT_RESOLVE not defined

From: Date: Sun, 11 Nov 2012 18:27:52 +0000
Subject: Req->Bug #63488 [Opn]: CURLOPT_RESOLVE not defined
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-174632@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63488&edit=1

 ID:                 63488
 User updated by:    kf at sumptuouscapital dot com
 Reported by:        kf at sumptuouscapital dot com
 Summary:            CURLOPT_RESOLVE not defined
 Status:             Open
-Type:               Feature/Change Request
+Type:               Bug
 Package:            HTTP related
 Operating System:   GNU/Linux
 PHP Version:        5.4.8
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#174632) next »