jkbr/httpie — pull request #90 by simonbuchan (2012-09-04 05:41:28+00:00)
Title: Fix --session for Windows (with a Requests patch)

A few fixes to get `--session` running on my windows machine :). You might want a different replacement, maybe in case you want to support edge cases on non-compliant DNS, like NetBIOS?

At least when running on python 3.3.0b2, I also needed this patch to Requests, although the current python 3 docs at least (for python 3.2.3) for `http.cookiejar.CookieJar.extract_cookies()` claim they require `unverifiable`, not `is_unverifiable` on the passed request?
````
diff --git a/requests/cookies.py b/requests/cookies.py
index bd2d665..b2ee6be 100644
--- a/requests/cookies.py
+++ b/requests/cookies.py
@@ -51,6 +51,9 @@ class MockRequest(object):
# unverifiable == redirected
return bool(self._r.response.history)

+ # urllib.request doesn't have is_unverifiable?
+ unverifiable = is_unverifiable
+
def has_header(self, name):
return name in self._r.headers or name in self._new_headers

````