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

Method _getComponent

src/cripts/Bundles/HRWBridge.cc:224–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222};
223
224cripts::string_view
225URL::_getComponent(cripts::Url &url)
226{
227 switch (_comp) {
228 case Component::HOST:
229 return url.host.GetSV();
230 break;
231
232 case Component::PATH:
233 return url.path;
234 break;
235
236 case Component::PORT:
237 _value = cripts::string(std::to_string(url.port));
238 break;
239
240 case Component::QUERY:
241 return url.query;
242 break;
243
244 case Component::SCHEME:
245 return url.scheme;
246 break;
247
248 case Component::URL:
249 return "";
250 // return url.url;
251 break;
252
253 default:
254 CFatal("[Cripts::Headers] Invalid URL component in HRWBridge.");
255 break;
256 }
257
258 return ""; // Should never happen
259}
260
261URL::URL(Type utype, const cripts::string_view &comp) : super_type("")
262{

Callers

nothing calls this directly

Calls 3

stringClass · 0.85
to_stringFunction · 0.50
GetSVMethod · 0.45

Tested by

no test coverage detected