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

Method setScheme

src/tscpp/api/Url.cc:186–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void
187Url::setScheme(const std::string &scheme)
188{
189 if (!isInitialized()) {
190 LOG_ERROR("Url %p not initialized", this);
191 return;
192 }
193
194 if (TSUrlSchemeSet(state_->hdr_buf_, state_->url_loc_, scheme.c_str(), scheme.length()) == TS_SUCCESS) {
195 LOG_DEBUG("Set scheme to [%s]", scheme.c_str());
196 } else {
197 LOG_ERROR("Could not set scheme; hdr_buf %p, url_loc %p", state_->hdr_buf_, state_->url_loc_);
198 }
199}
200
201void
202Url::setHost(const std::string &host)

Callers

nothing calls this directly

Calls 3

TSUrlSchemeSetFunction · 0.85
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected