--- common.inc 2006-08-26 15:19:09.000000000 +0100 +++ common.inc.new 2006-08-29 17:24:33.000000000 +0100 @@ -399,9 +399,11 @@ // We don't add the port to prevent from breaking rewrite rules checking // the host that do not take into account the port number. 'Host' => "Host: $host", - 'User-Agent' => 'User-Agent: Drupal (+http://drupal.org/)', - 'Content-Length' => 'Content-Length: '. strlen($data) - ); + 'User-Agent' => 'User-Agent: Drupal (+http://drupal.org/)' + ); + if (strlen($data) > 0) { + $defaults['Content-Length'] = 'Content-Length: '. strlen($data); + } foreach ($headers as $header => $value) { $defaults[$header] = $header .': '. $value;