Commits

Anonymous committed e23c3b0

Incorporate upstream fixes.

  • Participants
  • Parent commits 0acc205

Comments (0)

Files changed (1)

 
     def do_link(self, attrs):
         attrs = dict(attrs)
-        self.links[attrs['rel']] = attrs['href']
+        try:
+            self.links[attrs['rel']] = attrs['href']
+        except KeyError:
+            pass
 
     def do_meta(self, attrs):
         attrs = dict(attrs)
 
 def _prepare_response(response):
     if isinstance(response, str):
-        return cgi.parse_qs(response)
+        return cgi.parse_qs(response, keep_blank_values=True)
     # backwards compatibility: allow caller to pass parse_qs result
     # already
     pass