copysource

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package copysource parses the S3 X-Amz-Copy-Source header value shared by CopyObject, UploadPartCopy, and the policy engine's authorization check (which needs the source bucket/key before the handler runs). Kept as its own small package, with no dependency on either the HTTP handler or the policy package, so both can import it without a cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(header string) (bucket, key string, err error)

Parse extracts bucket and key from an X-Amz-Copy-Source header value. Accepts both "/bucket/key" and "bucket/key" forms. The value is percent-decoded (clients URL-encode the source key when it contains spaces or other special characters), and any trailing "?versionId=..." query component is stripped — DirIO doesn't support object versioning yet, so the version is ignored rather than becoming part of the key.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL