adding compatibility support for using --crawl and --forms together

This commit is contained in:
Miroslav Stampar
2011-10-29 09:32:20 +00:00
parent ddc4dfe5ff
commit ef987c6954
4 changed files with 16 additions and 9 deletions

View File

@@ -3363,6 +3363,9 @@ class HTMLForm:
if self.enctype == "application/x-www-form-urlencoded":
return (uri, urlencode(self._pairs()),
[("Content-Type", self.enctype)])
elif self.enctype == "text/plain":
return (uri, self._pairs(),
[("Content-Type", self.enctype)])
elif self.enctype == "multipart/form-data":
data = StringIO()
http_hdrs = []