From: gmblar at gmail dot com
Operating system: Windows 2000
PHP version: 5.1.6
PHP Bug Type: cURL related
Bug description: curl response garbage when using CURLOPT_NOBODY
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 bug report at http://bugs.php.net/?id=39086&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39086&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39086&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39086&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39086&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39086&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39086&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39086&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39086&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39086&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39086&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39086&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39086&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39086&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39086&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39086&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39086&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39086&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39086&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39086&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39086&r=mysqlcfg