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

Function url_CryptoHash_get

src/proxy/hdrs/URL.cc:1862–1879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1860}
1861
1862void
1863url_CryptoHash_get(const URLImpl *url, CryptoHash *hash, bool ignore_query, cache_generation_t generation)
1864{
1865 URLHashContext ctx;
1866 if ((url_hash_method != 0) && (url->m_url_type == URL_TYPE_HTTP) &&
1867 ((url->m_len_user + url->m_len_password + (ignore_query ? 0 : url->m_len_query)) == 0) &&
1868 (10u + url->m_len_scheme + url->m_len_host + url->m_len_path < BUFSIZE) &&
1869 (memchr(url->m_ptr_host, '%', url->m_len_host) == nullptr) && (memchr(url->m_ptr_path, '%', url->m_len_path) == nullptr)) {
1870 url_CryptoHash_get_fast(url, ctx, hash, generation);
1871#ifdef DEBUG
1872 CryptoHash hash_general;
1873 url_CryptoHash_get_general(url, ctx, hash_general, ignore_query, generation);
1874 ink_assert(*hash == hash_general);
1875#endif
1876 } else {
1877 url_CryptoHash_get_general(url, ctx, *hash, ignore_query, generation);
1878 }
1879}
1880
1881static inline void
1882url_CryptoHash_get_general_92(const URLImpl *url, CryptoContext &ctx, CryptoHash &hash, bool ignore_query,

Callers 2

hash_getMethod · 0.85

Calls 2

url_CryptoHash_get_fastFunction · 0.85

Tested by

no test coverage detected