diff --git a/keepalive/keepalive.py b/keepalive/keepalive.py index 066232a..fc73aef 100644 --- a/keepalive/keepalive.py +++ b/keepalive/keepalive.py @@ -308,7 +308,10 @@ def _start_transaction(self, h, req): try: if req.data: data = req.data - h.putrequest('POST', req.get_selector()) + if hasattr(req, 'selector'): + h.putrequest('POST', req.selector) + else: + h.putrequest('POST', req.get_selector()) if not req.headers.has_key('Content-type'): h.putheader('Content-type', 'application/x-www-form-urlencoded')