--- orig/includes/common.inc	2008-07-09 09:47:00.288869407 +0300
+++ patched/includes/common.inc	2008-07-09 09:50:59.242178780 +0300
@@ -452,9 +452,14 @@ function drupal_http_request($url, $head
     // 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)
   );
 
+  // Only add 'Content-Length' if we actually have any content. Some
+  // non-standard servers get confused by 0-length content.
+  if (strlen($data)) {
+    $defaults['Content-Length'] = 'Content-Length: '. strlen($data);
+  }
+
   // If the server url has a user then attempt to use basic authentication
   if (isset($uri['user'])) {
     $defaults['Authorization'] = 'Authorization: Basic '. base64_encode($uri['user'] . (!empty($uri['pass']) ? ":". $uri['pass'] : ''));
