Allow for multiple X-(Account|Container)-* headers.

When the number of account/container or container/object replicas are
different, Swift had a few misbehaviors. This commit fixes them.

* On an object PUT/POST/DELETE, if there were 3 object replicas and
  only 2 container replicas, then only 2 requests would be made to
  object servers. Now, 3 requests will be made, but the third won't
  have any X-Container-* headers in it.

* On an object PUT/POST/DELETE, if there were 3 object replicas and 4
  container replicas, then only 3/4 container servers would receive
  immediate updates; the fourth would be ignored. Now one of the
  object servers will receive multiple (comma-separated) values in the
  X-Container-* headers and it will attempt to contact both of them.

  One side effect is that multiple async_pendings may be written for
  updates to the same object. They'll have differing timestamps,
  though, so all but the newest will be deleted unread. To trigger
  this behavior, you have to have more container replicas than object
  replicas, 2 or more of the container servers must be down, and the
  headers sent to one object server must reference 2 or more down
  container servers; it's unlikely enough and the consequences are so
  minor that it didn't seem worth fixing.

The situation with account/containers is analogous, only without the
async_pendings.

Change-Id: I98bc2de93fb6b2346d6de1d764213d7563653e8d
Add --run-dir switch to swift-init

- Add ability to specify an alternative run_dir than the default
  /var/run/swift.
- DocImpact

Change-Id: I17677588f2c8da563b7fec2dc4fdc52da87126ed
Merge "Add --run-dir switch to swift-init"
Fix superfluous GET requests in swift-bench.

If you specified num_gets = 0 for a benchmarking run (say, if you're
benchmarking PUT rate), you'd still get each swift-bench-client
process doing 1 GET request. Now you don't.

This should also fix the case where you've got more objects than
swift-bench-client processes, for example when you're uploading a few
large objects and then doing lots of parallel GETs of those
objects. Now you'll get the number requested, not
max(number-requested, number-of-bench-clients).

Change-Id: Ied9eb733dd9af51a3c6af8b815ad6cff0ff746b7
prevent irregular auth_prefix config in tempauth

Tempauth handles a authorization request by request path.
If a request's path start with auth_prefix, tempauth middleware
handles that request to authorization method.
Therefore, when configuring auth_prefix to '/', all requests
handle to authorization method.

This change enables tempauth to prevent invalid auth_prefix
config '/' and similar empty auth_prefix in initialization method.

Fixes bug #1096538.

Change-Id: I20b157e2a0809c17409fc65a8eff0858fe4aff29
Merge "prevent irregular auth_prefix config in tempauth"
Update auto-generated docs

Removed sidebar with broken (static) links referencing out-of-date docs.

Added an external link to the Swift API docs

fixes bug #1025099

Change-Id: I7f3106175b84b1063f74aa6c5693ab1e422cdb59
Add more command-line options to swift-bench.

These settings:
  1. are already exposed via config file
  2. were not exposed as command-line options, and
  3. are things I wanted on the command line while benchmarking recently.

I didn't include short options for --(get|put|delete)-concurrency
since I couldn't think of good single-letter ones, and optparse won't
take "-gc", "-pc", or "-dc".

Change-Id: I0bd7c7ae2892244eed37b8c10c9357dc7e1190d3
Validate numericness of ports in builder files.

You can't really goof this up using bin/swift-ring-builder, but if you
have code that uses swift.common.ring.RingBuilder directly, you can
stuff e.g. "6002" in where you mean 6002, resulting in some fairly
baffling failures. (Yes, I have done this.)

Change-Id: I87b7b7066b9ea2ce6f82255605da99cf0d283689
Merge "Update auto-generated docs"
Merge "Add more command-line options to swift-bench."
Add handler for CORS "actual requests"

Fix for bug 1095130

* Added a wrapper function around public methods to handle
  CORS actual requests. These requests need to return some
  extra headers to be valid responses to a CORS request.
  Access-Control-Expose-Headers and Access-Control-Allow-Origin.

* Added support for the CORS header Access-Control-Expose-Headers.

* Some refactoring of the OPTIONS method so the
  "is_origin_allowed" logic can be reused.

* Added a little extra detail to the CORS documentation.

DocImpact

Change-Id: I68538e472a900775427f21a8a59e738a83dcc8bc
Merge "Add handler for CORS "actual requests""
more stuff

Change-Id: I65f4d450571add67a76041ca6633e712e5cb5a1d
Merge "Allow for multiple X-(Account|Container)-* headers."
Bulk Requests: auto extract archive and bulk delete middleware.

Fix small problem in ratelimiting middleware.

DocImpact

Change-Id: Ide3e0b9f4887626c30cae0b97eb7e2237b1df3ed
checking PUT

Change-Id: Id4fed36337aa1b45af13b02596da7e798626dc28
Merge branch 'master' of git://github.com/openstack/swift into slob
saving manifest file working

Change-Id: I0c570a67b01bce60bde6b78b206ad6f9afa76b3e