mine/kitsu-http.git
6 months agoUpdate version to 0.0.6 master
Alexey Borzenkov [Mon, 31 Oct 2011 20:22:33 +0000]
Update version to 0.0.6

6 months agoMake kitsu.http a namespace package as well
Alexey Borzenkov [Mon, 31 Oct 2011 20:14:19 +0000]
Make kitsu.http a namespace package as well

6 months agoUpdate code to use kitsu.http.client
Alexey Borzenkov [Mon, 31 Oct 2011 20:09:08 +0000]
Update code to use kitsu.http.client

6 months agokitsu.http.client: renamed from kitsu.http.sockets
Alexey Borzenkov [Mon, 31 Oct 2011 20:07:25 +0000]
kitsu.http.client: renamed from kitsu.http.sockets

6 months agokitsu.http.sockets: remove ssl from sys.modules in case import fails
Alexey Borzenkov [Mon, 31 Oct 2011 20:04:37 +0000]
kitsu.http.sockets: remove ssl from sys.modules in case import fails

6 months agokitsu.http.sockets: make HTTPProxyClient a better socket proxy
Alexey Borzenkov [Mon, 31 Oct 2011 20:02:35 +0000]
kitsu.http.sockets: make HTTPProxyClient a better socket proxy

8 months agoDon't fail on multiple Content-Length headers
Alexey Borzenkov [Thu, 1 Sep 2011 20:54:43 +0000]
Don't fail on multiple Content-Length headers

10 months agoUpdate version to 0.0.4
Alexey Borzenkov [Sat, 25 Jun 2011 10:47:42 +0000]
Update version to 0.0.4

10 months agoRespect request headers, but blacklist some of them on redirects
Alexey Borzenkov [Sat, 25 Jun 2011 10:46:39 +0000]
Respect request headers, but blacklist some of them on redirects

While correct approach would be to whitelist or discard, the way it
is currently used in anti-malware research with requirement of
maintaining header order makes it too tricky. So at least try
to remove some harmful headers on redirects.

10 months agoDon't expose header instances, only their names
Alexey Borzenkov [Sat, 25 Jun 2011 10:39:59 +0000]
Don't expose header instances, only their names

10 months agoOn redirects switch to GET method and add referer
Alexey Borzenkov [Sat, 25 Jun 2011 10:15:24 +0000]
On redirects switch to GET method and add referer

14 months agotests/test_sockets.py: fix a weird symbol near the end
Alexey Borzenkov [Fri, 4 Mar 2011 07:36:18 +0000]
tests/test_sockets.py: fix a weird symbol near the end

14 months agoUpdate version to 0.0.3
Alexey Borzenkov [Thu, 3 Mar 2011 21:55:12 +0000]
Update version to 0.0.3

14 months agoAdd scripts to run setup.py with monkey patches from eventlet and gevent
Alexey Borzenkov [Thu, 3 Mar 2011 21:52:47 +0000]
Add scripts to run setup.py with monkey patches from eventlet and gevent

14 months agoFix eventlet-related bug with requesting secure urls when using proxy + tests
Alexey Borzenkov [Thu, 3 Mar 2011 21:51:58 +0000]
Fix eventlet-related bug with requesting secure urls when using proxy + tests

17 months agoAdd examples/proxy-example.py
Alexey Borzenkov [Sun, 12 Dec 2010 22:14:06 +0000]
Add examples/proxy-example.py

It's not a very good example, but it's what I have for now...

17 months agoChange version and description
Alexey Borzenkov [Sun, 12 Dec 2010 22:10:51 +0000]
Change version and description

17 months agoMake sure Headers keys and values are strings, add tests
Alexey Borzenkov [Sun, 12 Dec 2010 22:04:29 +0000]
Make sure Headers keys and values are strings, add tests

17 months agoRemove old twisted code
Alexey Borzenkov [Sun, 12 Dec 2010 21:22:01 +0000]
Remove old twisted code

17 months agoAvoid importing anything inside of functions
Alexey Borzenkov [Sun, 12 Dec 2010 21:18:59 +0000]
Avoid importing anything inside of functions

20 months agoMake kitsu namespace package the way setuptools recommends
Alexey Borzenkov [Thu, 16 Sep 2010 20:59:36 +0000]
Make kitsu namespace package the way setuptools recommends

20 months agoAdd some very simple tests for Agent
Alexey Borzenkov [Wed, 15 Sep 2010 21:59:27 +0000]
Add some very simple tests for Agent

20 months agoAdd url and urlchain to responses in Agent.makeRequest
Alexey Borzenkov [Wed, 15 Sep 2010 18:07:21 +0000]
Add url and urlchain to responses in Agent.makeRequest

20 months agoRename create_connection to create_socket. Make connecting optional.
Alexey Borzenkov [Wed, 15 Sep 2010 18:04:17 +0000]
Rename create_connection to create_socket. Make connecting optional.

20 months agoGet rid of wrappers for gethostbyname and gethostbyaddr
Alexey Borzenkov [Wed, 15 Sep 2010 18:02:36 +0000]
Get rid of wrappers for gethostbyname and gethostbyaddr

20 months agoRename Client to HTTPClient and HTTPSProxyClient to HTTPProxyClient
Alexey Borzenkov [Tue, 14 Sep 2010 21:46:55 +0000]
Rename Client to HTTPClient and HTTPSProxyClient to HTTPProxyClient

20 months agoMove __all__ to top everywhere
Alexey Borzenkov [Tue, 14 Sep 2010 21:45:02 +0000]
Move __all__ to top everywhere

20 months agoAllow Headers to be used as weakref
Alexey Borzenkov [Tue, 14 Sep 2010 06:12:31 +0000]
Allow Headers to be used as weakref

20 months agoGet rid of unnecessary __slots__
Alexey Borzenkov [Tue, 14 Sep 2010 06:10:12 +0000]
Get rid of unnecessary __slots__

20 months agoAdd Connector to __all__
Alexey Borzenkov [Mon, 13 Sep 2010 22:40:25 +0000]
Add Connector to __all__

20 months agoBetter mimic socket behavior in HTTPSProxyClient
Alexey Borzenkov [Mon, 13 Sep 2010 22:23:45 +0000]
Better mimic socket behavior in HTTPSProxyClient

20 months agoAdd Connector class for connecting via http proxies
Alexey Borzenkov [Mon, 13 Sep 2010 21:59:00 +0000]
Add Connector class for connecting via http proxies

20 months agoFix HTTPSProxyClient
Alexey Borzenkov [Mon, 13 Sep 2010 21:55:48 +0000]
Fix HTTPSProxyClient

20 months agoInclude failing lines when parsing Request and Response
Alexey Borzenkov [Mon, 13 Sep 2010 21:54:52 +0000]
Include failing lines when parsing Request and Response

20 months agokitsu.http.sockets: fix some typos
Alexey Borzenkov [Mon, 13 Sep 2010 21:02:43 +0000]
kitsu.http.sockets: fix some typos

20 months agoAdd kitsu.http to packages and mark it zip_safe
Alexey Borzenkov [Mon, 13 Sep 2010 21:01:45 +0000]
Add kitsu.http to packages and mark it zip_safe

20 months agoDon't pollute kitsu namespace with symbols
Alexey Borzenkov [Mon, 13 Sep 2010 21:00:43 +0000]
Don't pollute kitsu namespace with symbols

20 months agoProcess redirects
Alexey Borzenkov [Sat, 11 Sep 2010 11:39:14 +0000]
Process redirects

20 months agoUse default agent headers
Alexey Borzenkov [Sat, 11 Sep 2010 11:25:32 +0000]
Use default agent headers

20 months agoProcess keepalive and close client when needed
Alexey Borzenkov [Sat, 11 Sep 2010 11:24:22 +0000]
Process keepalive and close client when needed

20 months agoAllow using None values to remove headers
Alexey Borzenkov [Sat, 11 Sep 2010 11:08:44 +0000]
Allow using None values to remove headers

20 months agoClose client in agent when request fails
Alexey Borzenkov [Sat, 11 Sep 2010 10:27:16 +0000]
Close client in agent when request fails

20 months agoDon't keep function references as method defaults
Alexey Borzenkov [Sat, 11 Sep 2010 10:26:44 +0000]
Don't keep function references as method defaults

20 months agoWork around some bugs with ssl timeouts not working
Alexey Borzenkov [Wed, 8 Sep 2010 23:14:04 +0000]
Work around some bugs with ssl timeouts not working

20 months agoPartial implementation of Agent for sockets
Alexey Borzenkov [Wed, 8 Sep 2010 22:49:42 +0000]
Partial implementation of Agent for sockets

20 months agoChange the way Client's sizelimit is enforced
Alexey Borzenkov [Wed, 8 Sep 2010 22:21:45 +0000]
Change the way Client's sizelimit is enforced

20 months agoMake sure to escape any whitespace in request target
Alexey Borzenkov [Wed, 8 Sep 2010 22:05:31 +0000]
Make sure to escape any whitespace in request target

20 months agosockets.py: add total size limit
Alexey Borzenkov [Tue, 7 Sep 2010 06:29:53 +0000]
sockets.py: add total size limit

20 months agotest_sockets: make Server threads shutdown properly
Alexey Borzenkov [Mon, 6 Sep 2010 23:32:08 +0000]
test_sockets: make Server threads shutdown properly

20 months agoAdd more .gitignore's
Alexey Borzenkov [Mon, 6 Sep 2010 23:01:16 +0000]
Add more .gitignore's

20 months agoAdd stub setup.py and README files
Alexey Borzenkov [Mon, 6 Sep 2010 22:58:42 +0000]
Add stub setup.py and README files

20 months agoMake test_sockets a proper test case
Alexey Borzenkov [Mon, 6 Sep 2010 22:47:52 +0000]
Make test_sockets a proper test case

20 months agoRename kitsu.http.agent to kitsu.http.sockets
Alexey Borzenkov [Mon, 6 Sep 2010 21:32:47 +0000]
Rename kitsu.http.agent to kitsu.http.sockets

20 months agoMake socket and data detachable from Client
Alexey Borzenkov [Mon, 6 Sep 2010 21:31:12 +0000]
Make socket and data detachable from Client

20 months agoBetter http exceptions
Alexey Borzenkov [Mon, 6 Sep 2010 21:30:21 +0000]
Better http exceptions

20 months agoStart reimplementing with both Twisted and sockets in mind
Alexey Borzenkov [Mon, 6 Sep 2010 20:50:15 +0000]
Start reimplementing with both Twisted and sockets in mind

23 months agoMake sure there are no circular references in TunnelProtocol
Alexey Borzenkov [Tue, 15 Jun 2010 19:15:36 +0000]
Make sure there are no circular references in TunnelProtocol

23 months agoFix a typo in TunnelProtocol
Alexey Borzenkov [Tue, 15 Jun 2010 19:15:04 +0000]
Fix a typo in TunnelProtocol

23 months agoClear all members in TunnelFactory after connection
Alexey Borzenkov [Tue, 15 Jun 2010 18:40:49 +0000]
Clear all members in TunnelFactory after connection

It is possible for args/kwargs to cause circular
references to the object that is establishing a
tunnel. This fixes the problem.

23 months agoProcess tunnel responses earlier
Alexey Borzenkov [Tue, 15 Jun 2010 18:34:55 +0000]
Process tunnel responses earlier

Fixes HTTP/1.0 tunnels closing prematurely

23 months agoDon't overwrite Host if it is specified in headers
Alexey Borzenkov [Sat, 12 Jun 2010 04:58:04 +0000]
Don't overwrite Host if it is specified in headers

23 months ago_parseProxy shouldn't fail if there is no proxy
Alexey Borzenkov [Mon, 24 May 2010 19:20:38 +0000]
_parseProxy shouldn't fail if there is no proxy

2 years agoAdd TunnelCreator class and example
Alexey Borzenkov [Sun, 16 May 2010 16:36:16 +0000]
Add TunnelCreator class and example

You can use it for making TCP/SSL connections via
https proxies, just like an example shows.

2 years agoGet rid of 'HTTP' prefixes in class names
Alexey Borzenkov [Sun, 16 May 2010 16:28:55 +0000]
Get rid of 'HTTP' prefixes in class names

2 years agoSay "in progress" instead of "is pending"
Alexey Borzenkov [Sun, 16 May 2010 16:20:13 +0000]
Say "in progress" instead of "is pending"

2 years agoSplit proxy parsing into _parseProxy function
Alexey Borzenkov [Sun, 16 May 2010 16:10:27 +0000]
Split proxy parsing into _parseProxy function

2 years agoFixed: buffer was always empty at response time
Alexey Borzenkov [Sun, 16 May 2010 16:08:19 +0000]
Fixed: buffer was always empty at response time

2 years agoMove stuff around a little
Alexey Borzenkov [Sun, 16 May 2010 14:05:30 +0000]
Move stuff around a little

2 years agoSuccessful response should include a url
Alexey Borzenkov [Tue, 11 May 2010 19:16:09 +0000]
Successful response should include a url

2 years agoMake it possible to limit response body size
Alexey Borzenkov [Tue, 11 May 2010 19:10:29 +0000]
Make it possible to limit response body size

2 years agoAlways specify Content-Length for non-GET requests
Alexey Borzenkov [Tue, 11 May 2010 19:05:19 +0000]
Always specify Content-Length for non-GET requests

2 years agoHard dependency on ssl is not needed here
Alexey Borzenkov [Tue, 11 May 2010 19:04:01 +0000]
Hard dependency on ssl is not needed here

2 years agoAdded two usage examples
Alexey Borzenkov [Mon, 10 May 2010 19:49:42 +0000]
Added two usage examples

One is a simple CONNECT-only proxy that I used
in my tests (uses kitsu_http to parse requests).
The other is an example of using HTTPAgent for
making several HTTP requests in a row (with
Keep-Alive between requests).

2 years agoMore features and cleanup
Alexey Borzenkov [Mon, 10 May 2010 19:20:57 +0000]
More features and cleanup

Now agent can timeout, there's redirection limit,
redirects can be disabled, plus connection can
stay open after success/failure, so it can be
reused for further requests. Also it can now use
CONNECT-only proxies for regular http requests,
just specify proxytype='https'.

2 years agoGet rid of unnecessary imports/exports and errors
Alexey Borzenkov [Mon, 10 May 2010 17:50:55 +0000]
Get rid of unnecessary imports/exports and errors

2 years agoGet rid of HTTPClient.state, we don't need it
Alexey Borzenkov [Mon, 10 May 2010 16:36:01 +0000]
Get rid of HTTPClient.state, we don't need it

Also, make sure we reset ourselves *BEFORE* doing
.callback or .errback, otherwise new requests
might fail, because we haven't finished the
other one.

Plus makeRequest now fail()s with traceback.

2 years agoHTTPAgent.makeRequest should always return Deferred
Alexey Borzenkov [Mon, 10 May 2010 16:06:11 +0000]
HTTPAgent.makeRequest should always return Deferred

2 years agoEnsure there's no buffered data before starting TLS
Alexey Borzenkov [Mon, 10 May 2010 15:55:54 +0000]
Ensure there's no buffered data before starting TLS

If there is then it means tunnel is not TLS or will
likely fail because this data is not in the socket
anymore.

2 years agoRename kitsu/http.py to kitsu_http.py
Alexey Borzenkov [Mon, 10 May 2010 15:49:51 +0000]
Rename kitsu/http.py to kitsu_http.py

Because python packages are very dump it's a bad
idea to take kitsu namespace for just one module.

2 years agoAdd LICENSE information
Alexey Borzenkov [Mon, 10 May 2010 13:26:19 +0000]
Add LICENSE information

2 years agoImplement HTTPS proxies, redirects, etc
Alexey Borzenkov [Mon, 10 May 2010 13:12:05 +0000]
Implement HTTPS proxies, redirects, etc

2 years agoAdd .gitignore
Alexey Borzenkov [Sun, 9 May 2010 12:55:18 +0000]
Add .gitignore

2 years agoAdd a very simplistic http agent
Alexey Borzenkov [Sun, 9 May 2010 12:50:23 +0000]
Add a very simplistic http agent

2 years agoGet rid of unnecessary callbacks for parsers and implement basic transfer encodings
Alexey Borzenkov [Sun, 9 May 2010 11:09:06 +0000]
Get rid of unnecessary callbacks for parsers and implement basic transfer encodings

2 years agoSome more work with headers
Alexey Borzenkov [Sun, 9 May 2010 08:51:34 +0000]
Some more work with headers

2 years agoinitial protocol implementation
Alexey Borzenkov [Sat, 8 May 2010 20:36:36 +0000]
initial protocol implementation