Files
versitygw/tests/rest_scripts
Barry Loongandniksis02 25f9790c0a fix(s3api): strip aws-chunked only for streaming uploads
- Replace `StripAwsChunkedEncoding` with `ParseContentEncoding`, which drops
  the token only when `x-amz-content-sha256` names a streaming payload type,
  so a client that sends `aws-chunked` on a hex-payload request keeps it
- Revert the `CopyObject` and `CreateMultipartUpload` call sites: both routes
  are registered with `streamBody` false, so a streaming payload type is
  rejected before the controller and the token can only be a stored value
- Reject `aws-chunked` combined with `UNSIGNED-PAYLOAD` in the authentication
  middleware, beside the existing payload-type validation, with a new
  `InvalidArgAwsChunkedUnsignedPayload`
- Add REST tests for the three cases: stripped from a chunked upload, kept on
  a hex-payload request, and rejected with `UNSIGNED-PAYLOAD`
- Add `CONTENT_ENCODING` to the PutObject REST script and a
  `check_content_encoding` driver for HeadObject
2026-09-22 02:03:09 +04:00
..
2026-07-31 14:04:12 -03:00
2026-03-10 09:47:37 -07:00
2026-05-05 19:07:56 -03:00
2025-03-05 16:22:34 -03:00
2025-07-19 15:06:19 -03:00
2025-07-19 15:06:19 -03:00

REST scripts

Parameters

The common S3 parameters for the scripts can be found in rest.sh. They are:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_ENDPOINT_URL
  • AWS_REGION

The OUTPUT_FILE parameter can be set to write the response data to a file.

Operation-specific parameters can be found by looking at the tops of the scripts. For example, for the CreateBucket operation, this would be BUCKET_NAME.

cURL

Most scripts will send a cURL message to an s3 server. The scripts all use the following parameters:

In the root folder, for example, the create_bucket.sh script can be run with:

AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<key> AWS_ENDPOINT_URL=<url> AWS_REGION=<region> BUCKET_NAME=<name> OUTPUT_FILE=<file> ./tests/rest_scripts/create_bucket.sh

A successful bucket creation will return a 200 code on the command line.

openssl

Some scripts will generate a raw REST API message that can be sent via openssl.

For example, to create this file with put_object_openssl.sh:

AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<key> AWS_ENDPOINT_URL=<url> AWS_REGION=<region> DATA_FILE=<data_file> BUCKET_NAME=<name> OBJECT_KEY=<desired key name> COMMAND_FILE=<output file> ./tests/rest_scripts/put_object_openssl.sh

This should generate a raw REST command file in the COMMAND_FILE location. This command can be sent to the S3 server with: openssl s_client -connect <server host and port> -ign_eof < <command file>