#include <XrdHttpHeaderUtils.hh>
|
| static void | parseReprDigest (const std::string &header, std::map< std::string, std::string > &output) |
| |
Definition at line 29 of file XrdHttpHeaderUtils.hh.
◆ parseReprDigest()
| void XrdHttpHeaderUtils::parseReprDigest |
( |
const std::string & |
header, |
|
|
std::map< std::string, std::string > & |
output |
|
) |
| |
|
static |
Definition at line 30 of file XrdHttpHeaderUtils.cc.
32 std::vector<std::string> digestNameValuePairs;
35 for (
const auto &digestNameValue : digestNameValuePairs) {
36 std::string_view digestNameValueSV {digestNameValue};
37 auto equalPos = digestNameValueSV.find(
'=');
38 if (equalPos == std::string::npos || equalPos >= digestNameValueSV.size() - 1)
41 std::string_view cksumTypeSV = digestNameValueSV.substr(0, equalPos);
43 if (cksumTypeSV.empty())
46 std::string_view cksumValueInSV = digestNameValueSV.substr(equalPos + 1);
47 size_t beginCksumPos = cksumValueInSV.find(
':');
48 size_t endCksumPos = cksumValueInSV.rfind(
':');
51 if (beginCksumPos == 0 && endCksumPos > beginCksumPos + 1 && endCksumPos < cksumValueInSV.size()) {
52 std::string_view cksumValue = cksumValueInSV.substr(beginCksumPos + 1, endCksumPos - beginCksumPos - 1);
54 if (!cksumValue.empty())
55 output[std::string(cksumTypeSV)] = cksumValue;
static void splitString(Container &result, const std::string &input, const std::string &delimiter)
Split a string.
static void trim(std::string &str)
References XrdOucTUtils::splitString(), and XrdOucUtils::trim().
The documentation for this class was generated from the following files: