Mailing Lists
|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[curl:bugs] #1172 curl-7.28.1: PHP curl_getinfo misbehavior
From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Wed, 19 Dec 2012 10:03:20 +0000
Thanks a lot for that info Pierrick, closing this entry now.
--- ** [bugs:#1172] curl-7.28.1: PHP curl_getinfo misbehavior** **Status:** closed-invalid **Created:** Tue Dec 11, 2012 08:57 PM UTC by Anthony G. Basile **Last Updated:** Wed Dec 19, 2012 04:49 AM UTC **Owner:** Daniel Stenberg Commit da82f59b697310229ccdf66104d5d65a44dfab98 ends support for CURLOPT\_SSL\_VERIFYHOST => 1. Using it in a php script still returns values for curl\_getinfo\(\) and curl\_multi\_getcontent\(\), however, it is not as it should be since the head of the returned HTML is cut off. For example, using the following script <?php $cm = curl\_multi\_init\(\); $stuffs = curl\_init\(\); $curl\_options = array\( CURLOPT\_URL => 'http://www.google.ca', CURLOPT\_RETURNTRANSFER => 1, CURLOPT\_SSL\_VERIFYHOST => 1, // toggle 0/1 to test CURLOPT\_SSL\_VERIFYPEER => 1, CURLOPT\_HEADER => 1 \); curl\_setopt\_array\($stuffs, $curl\_options\); curl\_multi\_add\_handle\($cm, $stuffs\); do \{ curl\_multi\_exec\($cm, $running\); \} while\($running > 0\); $content = curl\_multi\_getcontent\($stuffs\); $info = curl\_getinfo\($stuffs\); curl\_multi\_remove\_handle\($cm, $stuffs\); curl\_multi\_close\($cm\); print\_r\($info\); // cuts off too much, the header size is incorrect echo mb\_substr\($content, $info\['header\_size'\]\); ?> we get 0473,4000567,4000955,4001042,4001372,4001416,4001569,4001959,4001966,4002000,4002036,4002048,4002161,4002240,4002348,4002359,4002378,4002391,4002436,4002460,4002510,4002562,4002707,4002710,4002733,4002756,4002768,4002773,4002786,4002789,4002868,4002883",ei:"X2bFUMOTFOr-2QWDuYCgDg"\},authuser:0,ml:function\(\)\{\},kHL:"en",time:function\(\)\{return\(new .... with "<\!doctype html><html" cut off. Setting CURLOPT\_SSL\_VERIFYHOST => 0 fixes it. Of course, reverting to pre da82f5 "fixes" it to, but as noted in the commit message, this is not a good idea. Thanks to Andrew Saunders for isolating the issue\! See the downstream bug for more info. https://bugs.gentoo.org/show\_bug.cgi?id=444788 --- Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/curl/bugs/1172/> To unsubscribe from further messages, please visit <https://sourceforge.net/auth/prefs/>Received on 2012-12-19 These mail archives are generated by hypermail. |
Page updated January 05, 2012.
web site info