Skip to content

Commit

Permalink
close benoitc#63 Thanks!
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Dec 11, 2011
1 parent a774450 commit 41d73fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions restkit/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _ssl_wrapper(sck, **kwargs):
from http_parser.reader import SocketReader
except ImportError:
raise ImportError("""http-parser isn't installed.
pip install http-parser""")

from restkit import __version__
Expand Down Expand Up @@ -263,7 +263,7 @@ def proxy_connection(self, request, req_addr, is_ssl):

send(sck, proxy_pieces)
unreader = http.Unreader(sck)
resp = http.Request(unreader)
resp = Request(unreader)
body = resp.body.read()
if resp.status_int != 200:
raise ProxyError("Tunnel connection failed: %d %s" %
Expand Down Expand Up @@ -361,7 +361,7 @@ def perform(self, request):
hdr_expect.lower() == "100-continue":
sck.sendall(msg)
msg = None
resp = http.Request(http.Unreader(self._sock))
resp = Request(http.Unreader(self._sock))
if resp.status_int != 100:
self.reset_request()
if log.isEnabledFor(logging.DEBUG):
Expand Down Expand Up @@ -490,15 +490,15 @@ def get_response(self, request, connection):
if log.isEnabledFor(logging.DEBUG):
log.debug("Start to parse response")

p = HttpStream(SocketReader(connection.socket()), kind=1,
p = HttpStream(SocketReader(connection.socket()), kind=1,
decompress=self.decompress)

if log.isEnabledFor(logging.DEBUG):
log.debug("Got response: %s" % p.status())
log.debug("headers: [%s]" % p.headers())

location = p.headers().get('location')

if self.follow_redirect:
if p.status_code() in (301, 302, 307,):
if request.method in ('GET', 'HEAD',) or \
Expand Down
2 changes: 1 addition & 1 deletion restkit/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __call__(self, path):

new_uri = util.make_uri(uri, path, charset=self.charset,
safe=self.safe, encode_keys=self.encode_keys)

obj = type(self)(new_uri, **self.initial['client_opts'])
return obj

Expand Down
4 changes: 2 additions & 2 deletions restkit/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -
#
# This file is part of restkit released under the MIT license.
# This file is part of restkit released under the MIT license.
# See the NOTICE for more information.

version_info = (3, 3, 1)
version_info = (3, 3, 3)
__version__ = ".".join(map(str, version_info))

0 comments on commit 41d73fb

Please sign in to comment.