xrootd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
XrdHttpChecksumHandler Class Reference

#include <XrdHttpChecksumHandler.hh>

Collaboration diagram for XrdHttpChecksumHandler:
Collaboration graph
[legend]

Public Types

using XrdHttpChecksumRawPtr = XrdHttpChecksumHandlerImpl::XrdHttpChecksumRawPtr
 

Public Member Functions

 XrdHttpChecksumHandler ()=default
 
void configure (const char *csList)
 
XrdHttpChecksumRawPtr getChecksumToRun (const std::string &userDigest) const
 
const std::vector< std::string > & getNonIANAConfiguredCksums () const
 

Private Attributes

XrdHttpChecksumHandlerImpl pImpl
 

Detailed Description

This class allows to handle xrd http checksum algorithm selection based on what the user provided as a digest

Member Typedef Documentation

◆ XrdHttpChecksumRawPtr

Constructor & Destructor Documentation

◆ XrdHttpChecksumHandler()

XrdHttpChecksumHandler::XrdHttpChecksumHandler ( )
default

Member Function Documentation

◆ configure()

void XrdHttpChecksumHandler::configure ( const char *  csList)
inline

Configure this handler.

Exceptions
runtime_exceptionif no algorithm in the csList is compatible with HTTP
Parameters
csListthe list coming from the server configuration. Should be under the format 0:adler32,1:sha512

References XrdHttpChecksumHandlerImpl::configure(), and pImpl.

◆ getChecksumToRun()

XrdHttpChecksumRawPtr XrdHttpChecksumHandler::getChecksumToRun ( const std::string &  userDigest) const
inline

Returns the checksum to run from the user "Want-Digest" provided string

Parameters
userDigestthe digest string under the format "sha-512,sha-256;q=0.8,sha;q=0.6,md5;q=0.4,adler32;q=0.2"
Returns
the checksum to run depending on the userDigest provided string The logic behind it is simple: returns the first userDigest provided that matches the one configured. If none is matched, the first algorithm configured on the server side will be returned. If no HTTP-IANA compatible checksum algorithm has been configured or NO checksum algorithm have been configured, nullptr will be returned.

References XrdHttpChecksumHandlerImpl::getChecksumToRun(), and pImpl.

◆ getNonIANAConfiguredCksums()

const std::vector< std::string > & XrdHttpChecksumHandler::getNonIANAConfiguredCksums ( ) const
inline

Returns the checksums that are incompatible with HTTP --> the ones that we do not know whether the result should be base64 encoded or not

References XrdHttpChecksumHandlerImpl::getNonIANAConfiguredCksums(), and pImpl.

Member Data Documentation

◆ pImpl

XrdHttpChecksumHandlerImpl XrdHttpChecksumHandler::pImpl
private

The documentation for this class was generated from the following file: