Make ssync_receiver drop conn on exc

Before, the ssync receiver wouldn't hang up the connection with all
errors. Now it will. Hanging up early will ensure the remote end gets
a "broken pipe" type error right away instead of it possible sending
more data for quite some time before finally reading the error.

Change-Id: I2d3d55baaf10f99e7edce7843a7106875752020a
Adds a retry mechanism when deleting containers

Bulk middleware now has a mechanism to retry a delete when the
HTTP response code is 409. This happens when the container still
has objects. It can be useful in a bulk delete where you delete
all the objects in a container and then try to delete the container.
It is very likely that at the end it will fail because the replica
objects have not been deleted by the time the middleware got a
successful response.

Change-Id: I1614fcb5cc511be26a9dda90753dd08ec9546a3c
Closes-Bug: #1253478
Expose allowed tempurl methods in /info

Clients can construct tempurls for any method, but they only work if
they're in this list, so it's helpful for clients to see the list.

Change-Id: Id852f457d65b62c4fe79db01b1d7029a5fa5aa09
Just trying to keep /tmp clean

Change-Id: Ia8d7cf37a4f6a4652cb3440a896cefb411cdb41a
update ssync tests to use req.get_response()

Change-Id: I2fa752b42669fab27d1a8e7562d52d8f8b848351
Force catch_errors into pipeline

This commit adds a hook for WSGI applications
(e.g. proxy.server.Application) to modify their WSGI pipelines. This
is currently used by the proxy server to ensure that catch_errors is
present; if it is missing, it is inserted as the first middleware in
the pipeline.

This lets us write new, mandatory middlewares for Swift without
breaking existing deployments on upgrade.

Change-Id: Ibed0f2edb6f80c25be182b3d4544e6a67c5050ad
Merge "Just trying to keep /tmp clean"
Add swiftbrowser as an associated project

Swiftbrowser is a simple web app build with Django to access Openstack Swift.

Change-Id: I2d397f61e4c3fcd09ba994a06ec4d492f37ae34a
Preserve tracebacks from run_in_thread

Now the traceback goes all the way down to where the exception came
from, not just down to run_in_thread. Better for debugging.

Change-Id: Iac6acb843a6ecf51ea2672a563d80fa43d731f23
Fix obj versioning w/non-ASCII container name

If you create a container with a non-ASCII name, and then make another
container with X-Versions-Location: first-cøntåîner, *and* you're
serializing stuff in memcache as json (the default), when the proxy
tries to make a versioned object, it will crash.

The fix is to make sure that get_container_info() always returns strs,
not unicodes.

The long-term fix would be to get rid of simplejson entirely, as its
decoder can't make up its mind whether JSON strings should be Python
strs or unicodes, and that makes it really really easy to write bugs
like this.

Change-Id: Ib20ea5fb884484a4246d7a21a9f1e2ffd82eb04f
Allow running just one test with tox

Now, "tox -e py26 -- test.unit.proxy.test_server" runs just that one
test file.

"tox -e py26" still runs all the tests with py26, just like before.

Change-Id: I40db12dd5e7cc8f9388e29b30447f70d3bfc4b28
change the last-modified header value with valid one

the Last-Modified header in Response didn't have a suitable
value - an integer part of object's timestamp.
This leads that the the if-[un]modified-since header with the
value from last-modified is always earlier than timestamp
and results the content is always newer than value of these
conditional headers.
Patched code returns math.ceil() of object's timestamp
in Last-Modified header so the later conditional header works
correctly

Closes-Bug: #1248818
Change-Id: I1ece7d008551bf989da74d23f0ed6307c45c5436
Merge "Make ssync_receiver drop conn on exc"
Merge "change the last-modified header value with valid one"
Merge "Force catch_errors into pipeline"
Various optimizations to RingBuilder.rebalance()

Overall gain is about 20-22% of time on my laptop. This includes:

* replacing string sort_key with a tuple (because we can and because
  compairing two 3-tuples is faster than comparing two 26-byte strings);
* keeping track of hungriest dev in tier (allows us to use built-in
  dict.__getitem__ as a key instead of lambdas in couple of places);
* remove unnecessary sorted() call in the innermost loop (because we
  don't need to sort all of them or better we don't need to sort
  anything there);
* memoize tiers for each dev (saves just a couple of percents but why
  not).

Performance measurments have been done using this script:
http://paste.openstack.org/show/55609/

Related-Bug: #1262166
Related-Bug: #1261659
Change-Id: If38bd9fe82efc12b01e9aa146e0f4ab565fb6bea
Make POST for bulk delete actually work

Change-Id: I568e7e31df3dcbeac20dba6d543a13c0409de00e
Closes-Bug: 1232787
test 3 date format in functional tests

According to HTTP/1.1, servers MUST accept all three formats:

Sun, 06 Nov 1994 08:49:37 GMT     # RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT    # RFC 850, obsoleted by RFC 1036
Sun Nov 6 08:49:37 1994           # ANSI C's asctime() format

In functional tests, a date value header has 3 kinds of format will be
tested.

Change-Id: I679ed44576208f2a79bffce787cb55bda4b39705
Closes-Bug: #1253207
Merge "Expose allowed tempurl methods in /info"
Merge "test 3 date format in functional tests"