ID: 39086 Updated by: [EMAIL PROTECTED] Reported By: gmblar at gmail dot com -Status: Open +Status: Bogus Bug Type: cURL related Operating System: Windows 2000 PHP Version: 5.1.6 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The site in question sends different content depending on the headers sent. The "weird" numbers you see are actually part of the Transfer-Encoding: chunked Previous Comments: ------------------------------------------------------------------------ [2006-10-09 14:19:19] gmblar at gmail dot com same problem with latest 5.2 snapshot. webserver: lighttpd 1.4.11 with php over cgi curl info (phpinfo): libcurl/7.14.0 OpenSSL/0.9.8d zlib/1.2.3 ------------------------------------------------------------------------ [2006-10-09 09:49:57] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Cannot reproduce, ------------------------------------------------------------------------ [2006-10-09 03:05:49] gmblar at gmail dot com Description: ------------ toggle curl option CURLOPT_NOBODY between curl requests create garbage in response on some (not all!) servers Reproduce code: --------------- <?php $h = curl_init(); curl_setopt_array($h, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => 'http://webdesignblog.de/?p=612', CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HEADER => true, CURLOPT_NOBODY => true )); curl_exec($h); curl_setopt_array($h, array( CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HEADER => false, CURLOPT_NOBODY => false )); echo curl_exec($h); ?> Expected result: ---------------- !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <title> Webdesign - Unbezahlbar » Webdesignblog</title> <meta name="description" content="Webdesignblog spricht ueber Themen fuer Webdesigner und Webmaster. Alles was den Erfolg der eigenen Website oder des eigenen Blogs erhoeht und wie man sich als Webdesigner verbessert." /> <meta name="keywords" content="Webdesign, Website, Adsense, Grafikdesign, Design, Blog, bloggen, Affiliate, Suchmaschinen, Optimierung" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> ... Actual result: -------------- <title> 19 Webdesign - Unbezahlbar 9 » d Webdesignblog 8 </title> 1 193 <meta name="description" content="Webdesignblog spricht ueber Themen fuer Webdesigner und Webmaster. Alles was den Erfolg der eigenen Website oder des eigenen Blogs erhoeht und wie man sich als Webdesigner verbessert." /> <meta name="keywords" content="Webdesign, Website, Adsense, Grafikdesign, Design, Blog, bloggen, Affiliate, Suchmaschinen, Optimierung" /> <meta http-equiv="Content-Type" content=" 9 text/html a ; charset= 5 UTF-8 f0 " /> ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39086&edit=1