Skip to content

Add support explicitly requesting desired checksum algorithm for HTTP-TPC #24

@paulmillar

Description

@paulmillar

Currently, the choice of checksum algorithm follows a community convention, with the storage being configured to calculate the desired set of checksums.

In addition to this, dCache allows the HTTP-TPC client to request a specific checksum algorithm by using the standard Want-Digest HTTP header on the HTTP COPY request.

The following example shows how to request a SHA-256 checksum is calculated when transferring a file via HTTP-TPC.

 curl -H "Credential: none" \
 		-H "Want-Digest: SHA-256" \
		-X COPY \
		-H "Source: https://my-source.example.org/dir1/my-file.root" \
		-H "Authorization: Bearer $(oidc-token EGI-CHECKIN)" \
		https://dcache.example.org/Users/paul/my-file.root

If the Want-Digest header indicates multiple checksum algorithms then dCache will select the "strongest" (typically the one with the largest number of bits).

After a successful transfer, the file's checksums are stored within dCache's namespace. Subsequent RFC 3230 requests (e.g., via HTTP HEAD requests) may be used to fetch the value.

Please note that additional checksum algorithms may be calculated, depending on dCache configuration. These, too, may be fetched via RFC 3230 requests, irrespective of whether or not the HTTP-TPC client specifies a desired algorithm.

In addition, the requested checksum is made available as an HTTP trailer as part of the COPY request. This feature is only available if the client indicates it supports HTTP trailers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions