diff --git a/feeds.info b/feeds.info
index 1d5590f84fc1a2aaaeda58ea851c493d5dd133f5..0ce45e05669f31e92ac4a97de2ce9407a0b202a1 100644
--- a/feeds.info
+++ b/feeds.info
@@ -49,6 +49,7 @@ files[] = tests/feeds_processor_user.test
 files[] = tests/feeds_scheduler.test
 files[] = tests/feeds_mapper_link.test
 files[] = tests/feeds_mapper_taxonomy.test
+files[] = tests/http_request.test
 files[] = tests/parser_csv.test
 
 ; Views integration
diff --git a/libraries/http_request.inc b/libraries/http_request.inc
index 7e70fe6cbbbb6ee8a260949795003bfa14b4748a..852dd4b82233ff6d9265b36fe18b17f65ebfdba0 100644
--- a/libraries/http_request.inc
+++ b/libraries/http_request.inc
@@ -351,7 +351,11 @@ function http_request_find_feeds($html) {
     preg_match_all(HTTP_REQUEST_PCRE_TAG_ATTRIBUTES, $link_tag, $attributes, PREG_SET_ORDER);
     foreach ($attributes as $attribute) {
       // Find the key value pairs, attribute[1] is key and attribute[2] is the
-      // value.
+      // value.  However, if the link tag used single quotes, the value might
+      // be in attribute[3] instead.
+      if (empty($attribute[2])) {
+        $attribute[2] = $attribute[3];
+      }
       if (!empty($attribute[1]) && !empty($attribute[2])) {
         $candidate[drupal_strtolower($attribute[1])] = drupal_strtolower(decode_entities($attribute[2]));
       }
diff --git a/tests/http_request.test b/tests/http_request.test
new file mode 100644
index 0000000000000000000000000000000000000000..de6b1e1d5c941960c05d1be66f167f9c55159b59
--- /dev/null
+++ b/tests/http_request.test
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Tests for http_request.inc.
+ */
+
+/**
+ * Tests for the http library.
+ */
+class FeedsHTTPRequestTestCase extends FeedsUnitTestHelper {
+  public static function getInfo() {
+    return array(
+      'name' => 'HTTP library',
+      'description' => 'Tests for Feeds HTTP library.',
+      'group' => 'Feeds',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp();
+    feeds_include_library('http_request.inc', 'http_request');
+  }
+
+  /**
+   * Tests http_request_find_feeds().
+   */
+  public function testHTTPRequestFindFeeds() {
+    $html = <<<EOF
+<html>
+  <head>
+    <title>Welcome to Example.com</title>
+    <link rel="stylesheet" type="text/css" media="screen, projection" href="/stuff.css" >
+    <link rel="search"    title="Something" href="//example.com/search">
+    <link rel="alternate" title="Something RSS" href="http://example.com/rss.xml" type="application/rss+xml">
+    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+  </head>
+  <body>
+    This is a body.
+  </body>
+</html
+EOF;
+
+    $links = http_request_find_feeds($html);
+    $this->assertEqual(count($links), 1);
+    $this->assertEqual($links[0], 'http://example.com/rss.xml');
+
+    // Test single quoted HTML.
+    $links = http_request_find_feeds(str_replace('"', "'", $html));
+    $this->assertEqual(count($links), 1);
+    $this->assertEqual($links[0], 'http://example.com/rss.xml');
+  }
+
+}