Use computed size on object PUT, not fstat.

The object server knows the size of the file on disk already since
it's counted the bytes as they were written out. There's no need to go
ask the filesystem.

This also lets object PUTs work when the filesystem is some crazy,
non-POSIX thing that doesn't always give the right answers from
fstat(). See bug 904723 for a case when this happened.

Fixes bug 904723.

Change-Id: Ibdf44ea991e0cc4f9e0997cc9ff566cb0eac5332
Fixed bugs with internal client and object expirer

These bug fixes are lumped together because they all caused problems
with the object expirer doing its job.

There was a bug with the internal client doing listings that happened
to run across a Unicode object name for use as a marker.

There was a bug with the object expirer not utf8 encoding object
names it got from json listings, causing deletes to fail.

There was a bug with the object expirer url quoting object names when
calling the internal client's make_request, when make_request already
handles that.

Change-Id: I29fdd351fd60c8e63874b44d604c5fdff35169d4
Fixed swift-bench when using -b and a conf file

Change-Id: I72448cd8578b53a658f151354a26066772e4b9ec
Merge "Fixed bugs with internal client and object expirer"
Merge "Use computed size on object PUT, not fstat."
use Host: for location rewrites

If the Host header is available, use it for making relative URLs absolute.
Otherwise, continue using SERVER_NAME.

Change-Id: Ifc028264ad1b122a2d5dff9d5528cb369090429f
charset for default responses

Set a utf-8 charset on default text/html responses.

Change-Id: Ic5f661bd475dca83763d4b55419ad031279e3ba1
Make DELETE requests to expired objects return 404.

It is already the case that a DELETE of a deleted object results in a
404, and GET/HEAD/POSTs to both expired and deleted objects result in
404s. However, a DELETE of an expired object resulted in a 202. This
change makes it consistent with the other verbs.

Fixes bug 1076245.

Change-Id: I793e62d72461a4fb9fb3404e10658ddcc4c3a7a6
Merge "use Host: for location rewrites"
give swob default content-type

This should fix up the few remaining API regressions from swob, by giving all
responses a default content-type of "text/html; charset=UTF-8".

Change-Id: Ib3b859e63c5e8c4af6f7fe535947402b5df57399
Make swift-bench use less memory with large object sizes.

Before, swift-bench would create a string of the right size and pass
that to [direct_]put_object. Uploading 5 GB objects w/concurrency of
4? Hope you've got a spare 20 GB of RAM in that machine.

Now it lazily generates chunks (of size 64 KiB) to send. In my limited
testing, this keeps RAM usage low while not impacting speed.

There's backwards-compatibility code in
direct_client.direct_put_object for any callers who are still passing
in strings. There aren't any such in Swift's codebase, though. All one
of those callers now pass an iterable.

Fixes bug 911925.

Change-Id: I40669fc00c7fb6699d8fb514e1be9b69436eca42
Merge "Make DELETE requests to expired objects return 404."
Merge "Make swift-bench use less memory with large object sizes."
fix error with setting max age and incorrect tests

Change-Id: I3f0db3b70ea5df323597b556682c2d1fb28afe53
Merge "fix error with setting max age and incorrect tests"