swift/test/unit/common
Clay Gerrard fa889358ac Ensure correct content-type in container HEAD response
A failing CORS test in the gate discovered that we were responding
application/json to ?format=txt requests (which is maybe not even a
valid value for that qs param?), but only when running with
eventlet==0.38.0

This avoids the problem of backend container server HEADs no longer
having 'Content-Length: 0' by fixing the client HEAD resp headers before
we check for chunked-transfer resp.

Drive-By: refactor listing_formats to use HeaderKeyDict and always set
Content-Length explicitly

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Co-Authored-By: Matthew Oliver <matt@oliver.net.au>

Change-Id: If724485e1425d1481d10b9255436301e346f07e8
2024-11-25 10:15:04 +11:00
..
middleware Ensure correct content-type in container HEAD response 2024-11-25 10:15:04 +11:00
ring lint: Up-rev hacking 2024-02-07 15:48:39 -08:00
utils Fix duplicate prefix in exception logging 2024-11-18 18:06:55 +00:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
corrupted_example.db Real files for bad databases. 2011-08-02 18:21:25 +00:00
malformed_example.db Update malformed_example.db to actually be malformed 2024-01-25 04:37:04 +00:00
malformed_schema_example.db Quarantine malformed database schema SQLite errors 2016-12-01 14:17:02 +11:00
missing_container_info.db Quarantine DB without *_stat row 2018-02-07 19:35:05 +01:00
test_base_storage_server.py Allow replication servers to handle all request methods 2020-07-23 09:11:07 -07:00
test_bufferedhttp.py bufferedhttp: Tolerate socket being None 2021-06-28 16:16:27 -07:00
test_constraints.py Deprecate per-service auto_create_account_prefix 2020-01-05 09:53:30 -06:00
test_container_sync_realms.py Allow floats for a couple more intervals 2021-06-07 15:34:19 -07:00
test_daemon.py Remove PrefixLoggerAdapter and SwiftLoggerAdapter 2024-11-13 15:40:41 -05:00
test_db_auditor.py lint: Up-rev hacking 2024-02-07 15:48:39 -08:00
test_db_replicator.py Merge "replicator: Ensure handoffs can clear with large handoff_delete" 2024-05-20 21:41:28 +00:00
test_db.py cli: add --sync to db info to show syncs 2024-01-16 08:19:08 -08:00
test_digest.py formpost: deprecate sha1 signatures 2022-07-26 10:39:58 +10:00
test_direct_client.py direct_client: support extra request params for direct_get_container. 2023-08-17 11:57:22 -07:00
test_error_limiter.py proxy-server: include suppression time in error limit log 2022-11-21 10:52:11 +00:00
test_exceptions.py lint: Consistently use assertIsInstance 2024-02-07 15:48:39 -08:00
test_header_key_dict.py py3: Fix title-casing in HeaderKeyDict 2019-07-25 12:55:03 -07:00
test_http_protocol.py tests: Exercise recent eventlet breakage without XFS 2024-01-18 10:35:52 -08:00
test_internal_client.py Remove PrefixLoggerAdapter and SwiftLoggerAdapter 2024-11-13 15:40:41 -05:00
test_linkat.py Fix tests using O_TMPFILE 2018-03-13 12:06:07 +00:00
test_manager.py lint: Consistently use assertIsInstance 2024-02-07 15:48:39 -08:00
test_memcached.py test: implement cache expiration time in MockMemcached 2024-03-15 13:50:32 +11:00
test_recon.py recon: refactor common recon names into a common location 2021-06-29 15:22:57 -07:00
test_registry.py Add docs for registry module 2022-02-10 11:17:06 -08:00
test_request_helpers.py s3api: include error response reason in log_info 2024-06-19 11:06:11 +01:00
test_splice.py No longer import nose 2017-11-07 15:39:25 +11:00
test_statsd_client.py Remove PrefixLoggerAdapter and SwiftLoggerAdapter 2024-11-13 15:40:41 -05:00
test_storage_policy.py lint: Consistently use assertIsInstance 2024-02-07 15:48:39 -08:00
test_swob.py lint: Consistently use assertIsInstance 2024-02-07 15:48:39 -08:00
test_utils.py utils: paths with empty components are invalid 2024-09-06 14:51:44 -07:00
test_wsgi.py Python 3.12: do not use ssl.wrap_socket 2024-06-28 09:14:58 -07:00