-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate {application,text}/xml headers on gateway by client's choice (…
…#992) * Generate {application,text}/xml headers on gateway by client's choice If no header is specified, none is explicitly generated. Then the Go http server generates one by scanning content, it happens to be text/xml. If either of these headers is specified, generate that requested content type. If (only) other headers are generated, respond "Not Acceptable". This does not break backwards compatibility with clients that do not generate such a header (boto, mc). This should improve compatibility with a client that explicitly asks for application/xml (the Akka S3 client alpakka only accepts that Content-Type, so it had better ask for it). It *will* break a lying client that requests only anything-but-standard-XML. * Change default return type to application/xml Matches behavipours of S3 (verified by @ozkatz on encrypted with Postman) and minio (verified on plaintext with Wireshark) * Set application/xml by default, except for object HEAD and GET All S3 gateway responses are application/xml, except when replying with contents from adapter. There keep the existing behaviour (Go http content type detection). We can add content-type forwarding to all our adapters, but that would be a separate change. Files returned from get-object keep their original Content-Type - auto-detected right now, but may change to forward from the block adapter if we decide to be more like S3 (in response to customer demand). Honour an Accepts header *if present*, allowing a client to prefer text/xml. Accepts headers are not usefully relevant to get-object, and continue to be ignored. * [CR] Improve documentation of default vs proxied content-type
- Loading branch information
1 parent
d19107d
commit 68cdf0c
Showing
4 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters