From 196fdc451d70635842f9fc0c56972c9fa43ade32 Sun, 5 Feb 2012 17:41:55 +0100
From: hass <hass@85918.no-reply.drupal.org>
Date: Sun, 5 Feb 2012 17:41:24 +0100
Subject: [PATCH] #1428484: HTTP version improperly formated

diff --git a/httprl.module b/httprl.module
index c0e979a..7bae350 100644
--- a/httprl.module
+++ b/httprl.module
@@ -333,8 +333,8 @@
     $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : ''));
   }
 
-  // Assemble the request together.
-  $request = $options['method'] . ' ' . $path . ' HTTP/' . $options['version'] . "\r\n";
+  // Assemble the request together. HTTP version requires to be a float.
+  $request = $options['method'] . ' ' . $path . ' HTTP/' . sprintf("%.1F", $options['version']) . "\r\n";
   foreach ($options['headers'] as $name => $value) {
     $request .= $name . ': ' . trim($value) . "\r\n";
   }
