Romain Bignon
5e199bdfa9
fix browser2 to be compliant with python-requests >= 2.0
2014-03-10 13:11:07 +01:00
Laurent Bachelier
61e7b93779
Some PEP8 fixes
2014-03-10 13:11:07 +01:00
Laurent Bachelier
1ff07273b3
Add base URL restriction
...
For security reasons (SSL only, no leakage, etc.)
2014-03-10 13:11:07 +01:00
Laurent Bachelier
f7fabfeb7d
browser2: More tests for absolute URLs
2014-03-10 13:11:07 +01:00
Laurent Bachelier
1c404639c1
browser2: Separate CookieJar from CookiePolicy
...
And avoid methods starting by _!
2014-03-10 13:11:07 +01:00
Laurent Bachelier
e793fd14da
browser2: Use cookie testing services
...
Both are aimed at real browsers.
This also adds a "real-life" cookie deletion/expiration test.
2014-03-10 13:11:07 +01:00
Laurent Bachelier
ef379f830e
browser2: Fix cookie security in redirections
...
With tests (another reason why it's good to write them).
2014-03-10 13:11:07 +01:00
Laurent Bachelier
83e08c103d
browser2: Add easy cookie building
2014-03-10 13:11:07 +01:00
Laurent Bachelier
baef03c198
browser2: Test cookie override
2014-03-10 13:11:06 +01:00
Laurent Bachelier
2d70d11822
browser2: Handle cookies in the request/response cycle
...
Unlike the one by python-requests, it is secure, and generally behaves
like a real browser.
Basic test added.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
57e16e9fe4
browser2: Handle redirects internally
...
python-requests isn't secure enough, and some behavior depends on the
latest version.
Tested on 0.10.6.
So instead of the previous hack, we have some copy-paste.
But we gain secure cookies handling (not there yet),
referrer handling, "proper" redirect on POST behavior.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
db304b955c
browser2: Handle cookie expiration, session cookies
...
Every related method accepts a "now" parameter. If provided, it will be
used instead of the system time.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
f17e61d73f
browser2: PostBin is now disabled
...
But RequestBin can't help test the bug.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
295e07b3ed
browser2: Add CookieJar and related cookie handling
...
Not used by Browser for now, but with very detailed tests.
Does not handle expirations yet.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
538c0ee92b
browser2: Handle Referrer, more documentation
2014-03-10 13:11:06 +01:00
Laurent Bachelier
d2c4085508
browser2: More tests
2014-03-10 13:11:06 +01:00
Laurent Bachelier
42b5eeeb77
browser2: Try to have extensive documentation
2014-03-10 13:11:06 +01:00
Laurent Bachelier
92073a2cf1
browser2: Better tests
...
Allow using local services, add RequestBin support.
Still using PostBin for the empty POST issue.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
b70d722c03
browser2: Add support for relative URLs / BASEURL
2014-03-10 13:11:06 +01:00
Laurent Bachelier
60d1d03c1c
browser2: Handle server issues of postbin.org
...
And move tests outside.
2014-03-10 13:11:06 +01:00