Hello,
// Problem CURLINFO_EFFECTIVE_URL either begins with "HTTP://" (uppercase) or "http://" (lowercase). source → CURLINFO_EFFECTIVE_URL pouet.net → http://www.pouet.net/ www.pouet.net → HTTP://www.pouet.net lemonde.fr → http://www.lemonde.fr/ www.lemonde.fr → HTTP://www.lemonde.fr pastebin.com → HTTP://pastebin.com www.pastebin.com → http://pastebin.com/ curl.haxx.se → HTTP://curl.haxx.se www.curl.haxx.se → HTTP://www.curl.haxx.se google.com → http://www.google.fr/?gws_rd=cr&ei=tracking_junk www.google.com → http://www.google.fr/?gfe_rd=cr&ei=tracking_junk // Affected product Tested on libcurl 7.26.0 (used with PHP). // Expected behavior Lowercase every time. // How to reproduce the bug Copy/paste this piece of code in a file, from the CLI, run: $ php file (syntax highlighting: http://pastebin.com/AeYSh0Aj ) <?php $urls = array( 'pouet.net', 'www.pouet.net', 'lemonde.fr', 'www.lemonde.fr', 'pastebin.com', 'www.pastebin.com', 'curl.haxx.se', 'www.curl.haxx.se', 'google.com', 'www.google.com' ); foreach ($urls as $source) { $req = curl_init(); $options = array( CURLOPT_FAILONERROR => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HEADER => true, CURLOPT_NOBODY => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => $source, ); curl_setopt_array($req, $options); if ($res = curl_exec($req)) { echo $source . ' → ' . curl_getinfo($req, CURLINFO_EFFECTIVE_URL); curl_close($req); } else { echo $source . ' → ' . 'failed'; } echo "\n\n"; } Thanks for your help, Marc ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
