Commit Graph

979 Commits

Author SHA1 Message Date
Ben Darnell e1dca57b23 Return the Etag header on 304 responses to an If-None-Match request. 2012-02-19 21:47:07 -08:00
Ben Darnell 2c83f471fb Revert "Use copy.deepcopy to clone HTTPRequest when following redirects."
This reverts commit b7e6046465.

Something about this broke the tests.
2012-02-19 21:37:50 -08:00
Ben Darnell b7e6046465 Use copy.deepcopy to clone HTTPRequest when following redirects.
This gives each request in a redirect chain its own copy of the
headers dictionary.

Closes #459.
2012-02-19 21:30:15 -08:00
Olivier Hardy eac1e538b4 In template, use handler reverse_url instead of application one 2012-02-19 20:52:58 -08:00
Olivier Hardy 99d9d74c22 Fix locale.get_supported_locales(): remove cls parameter 2012-02-19 20:52:25 -08:00
Ben Darnell 63a3ed657a Merge remote-tracking branch 'jehiah/max_simultaneous_connections_457' 2012-02-19 20:31:48 -08:00
Ben Darnell 9431921ba8 Merge remote-tracking branch 'grydstedt/master' into work 2012-02-19 20:25:43 -08:00
Ben Darnell ceabffe26c Test for https://github.com/facebook/tornado/pull/454 2012-02-19 20:08:26 -08:00
Ben Darnell dca74f675e Merge remote-tracking branch 'minrk/strkeys' into work 2012-02-19 20:04:13 -08:00
Ben Darnell 2db0aceb32 Further refactoring of duplicated IOStream logic 2012-02-19 19:50:01 -08:00
Ben Darnell 01dd70c525 Merge remote-tracking branch 'birknilson/iostream_refactoring_read' into work
Conflicts:
	tornado/iostream.py
2012-02-19 19:41:50 -08:00
Ben Darnell 56ec1ee597 Pass parsed hostname around explictly instead of storing it on the urlsplit result.
In some versions of python (including 2.5 and 3.2 but not 2.6 or 2.7),
urlsplit results use __slots__ and therefore don't allow artibrary attributes
to be set.

Also move the storing of the parsed hostname above hostname_mapping,
since the cert should be checked against the requested url, not the remapped
one.

Closes #448.
2012-02-19 19:33:08 -08:00
Ben Darnell 83a0eedff9 Merge remote-tracking branch 'ei-grad/master' into work 2012-02-19 19:22:31 -08:00
Ben Darnell 70ea7a5a6c Use a single Cookie.SimpleCookie for outgoing cookies instead of a list.
The main reason for this change is to repeated calls to set_cookie
overwrite rather than append.

Closes #445.
2012-02-19 18:47:46 -08:00
Ben Darnell 2539f8376c Start a new release-notes file 2012-02-19 18:25:24 -08:00
Ben Darnell 2d665a41b0 Check in autopep8 script 2012-02-09 01:08:04 -08:00
Ben Darnell 605c521390 Fix weird indentation in auth.py and simple_httpclient_test.py 2012-02-09 01:02:25 -08:00
Ben Darnell c152b78448 While I'm touching every file, run autopep8 too.
Might as well get all the merge headaches over with at once :)

Ran with
$ autopep8 --ignore=E111,W602 i tornado/*.py tornado/platform/*.py tornado/test/*.py
2012-02-09 00:55:27 -08:00
Ben Darnell 58a7ff10a8 Turn on __future__ division too.
All existing uses of division were already using a float for at least
one operand (except the tests that just do 1/0 as a quick way to throw
an exception).

We have now turned on all the __future__ options available in python2.5.
2012-02-09 00:17:58 -08:00
Ben Darnell 837da79ef9 Fix one last implicit relative import 2012-02-08 23:38:34 -08:00
Ben Darnell da6d821e0c Standardize future imports for all files in the package. 2012-02-08 23:22:51 -08:00
Ben Darnell 27f9c3a775 Add a script to rewrite __future__ imports 2012-02-08 23:16:56 -08:00
Jehiah Czebotar 5872722720 pass kwargs through HTTPClient 2012-02-03 23:46:31 -05:00
Gustav Rydstedt 1157a55a44 Add support for client certificates in curl http client 2012-02-03 15:28:31 -08:00
MinRK 0b75124bb2 coerce kwarg keys to str
If handler regex is unicode, the keys of groupdict are unicode, but should be
str, as Python < 2.6.5 does not accept unicode keys in:

    _execute(*args, **kwargs)

Since they are for keyword args, they will be valid identifiers, and thus ascii.
2012-02-02 14:05:59 -08:00
Birk Nilson 05ab0be97a Move identical IOStream read handling in read_until, read_until_regex
and read_bytes to private method.
2012-02-02 21:35:24 +01:00
Ben Darnell ffc9b3d4e3 Remove unused __main__ block that ran doctests from a non-test module. 2012-02-02 09:56:47 -08:00
Ben Darnell de4c5fa60c Merge remote-tracking branch 'igorsobreira/master' 2012-02-02 09:44:18 -08:00
Ben Darnell 65531eda0f Enable strict warnings in test runs.
This includes python 3.2's ResourceWarnings, which exposed the
socket leaks fixed in the previous commit.
2012-02-01 09:20:44 -08:00
Ben Darnell fa643437ba Always close sockets in simple_httpclient instead of leaving them for the GC.
Also fix some other sockets left open in tests.

Closes #451.
2012-02-01 09:19:31 -08:00
Ben Darnell b151a1ee96 Add a version check for the curses unicode hack so it won't break when
python 3.2.3 or 3.3 are released.

Closes #450.
2012-01-31 00:34:12 -08:00
Ben Darnell 50b28c5d7a Remove optional setuptools import.
We don't rely on any setuptools features for python2 builds, and the
optional import makes our builds depend on the environment in subtle
ways (egg-info directories, etc).
2012-01-30 23:46:36 -08:00
Ben Darnell 501a551ea2 Bump post-release version number (now pep 386 compliant!) 2012-01-30 23:39:31 -08:00
Ben Darnell cc8e893257 Revert "Run the website in python2.7 mode"
Can't use python2.7 mode without migrating to the "high-replication
datastore", and even though we don't have any data "migration" is a
pain.

This reverts commit e960e9bc9d.
2012-01-30 11:10:17 -08:00
Ben Darnell 02bc76155d Set version number to 2.2. 2012-01-30 11:01:44 -08:00
Ben Darnell 61ba1fb648 Final release notes for 2.2 2012-01-30 11:01:35 -08:00
Ben Darnell e960e9bc9d Run the website in python2.7 mode 2012-01-29 21:57:08 -08:00
Ben Darnell 1910ea1530 Add a highlights section to the release notes. 2012-01-29 21:53:45 -08:00
Andrew Grigorev 42656e6938 fixed usage of bad hostname (ipv6 addresses support is broken in urlparse until 2.7) 2012-01-30 08:12:24 +04:00
Igor Sobreira b12edb12d5 Add test to parse_multipart_form_data() when no "name" parameter is found 2012-01-25 00:19:40 -02:00
Igor Sobreira 97009a380e Add test to parse_multipart_form_data() when line does not end with the correct line break (\r\n) 2012-01-25 00:14:17 -02:00
Igor Sobreira e5a6037872 Add test to parse_multipart_form_data() when invalid Content-Disposition 2012-01-24 23:48:54 -02:00
Igor Sobreira 76b002e8e5 Add test to parse_multipart_form_data() when missing headers 2012-01-24 23:43:47 -02:00
Igor Sobreira 554570d658 Add test to parse_multipart_form_data() on httputil when "boundary" parameter has quotes 2012-01-24 22:45:18 -02:00
Ben Darnell 067e465b92 Document curl_httpclient empty password fix.
Accept None as auth_password in simple_httpclient for consistency with
curl_httpclient.
2012-01-23 10:20:35 -08:00
Ben Darnell 9a8e5e4d86 Merge commit 'df23c' 2012-01-23 10:12:56 -08:00
Ben Darnell 7fd178840b Fix gen.engine docs on decorator order.
Add some more test cases that use gen.engine and web.asynchronous together.
2012-01-23 09:45:29 -08:00
dave mankoff df23c039d5 change encode('ascii') to utf8() 2012-01-23 08:33:51 -05:00
Ben Darnell 463baf4347 Add a timeout to test_sslv2_fail so it passes on cygwin. 2012-01-22 18:15:01 -08:00
Ben Darnell e04957d535 Doc updates 2012-01-22 17:52:43 -08:00