MCPcopy Create free account
hub / github.com/apache/trafficserver / canonicalEncode

Function canonicalEncode

plugins/origin_server_auth/aws_auth_v4.cc:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159String
160canonicalEncode(const String &in, bool isObjectName)
161{
162 String canonical;
163 if (!isUriEncoded(in, isObjectName)) {
164 /* Not URI-encoded */
165 canonical = uriEncode(in, isObjectName);
166 } else {
167 /* URI-encoded, then don't encode since AWS does not encode which is not mentioned in the spec,
168 * asked AWS, still waiting for confirmation */
169 canonical = in;
170 }
171
172 return canonical;
173}
174
175/**
176 * @brief Trim white spaces from beginning and end. Squeeze consecutive spaces from middle.

Callers 1

Calls 2

isUriEncodedFunction · 0.85
uriEncodeFunction · 0.85

Tested by

no test coverage detected