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

Function getClientRequest

plugins/esi/combo_handler.cc:582–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582static void
583getClientRequest(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc hdr_loc, TSMLoc url_loc, ClientRequest &creq)
584{
585 int query_len;
586 const char *query = TSUrlHttpQueryGet(bufp, url_loc, &query_len);
587
588 if (!query) {
589 LOG_ERROR("Could not get query from request URL");
590 creq.status = TS_HTTP_STATUS_BAD_REQUEST;
591 return;
592 } else {
593 if (!getDefaultBucket(txnp, bufp, hdr_loc, creq)) {
594 LOG_ERROR("failed getting Default Bucket for the request");
595 return;
596 }
597 if (query_len > MAX_QUERY_LENGTH) {
598 creq.status = TS_HTTP_STATUS_BAD_REQUEST;
599 LOG_ERROR("querystring too long");
600 return;
601 }
602 parseQueryParameters(query, query_len, creq);
603 creq.client_addr = TSHttpTxnClientAddrGet(txnp);
604 checkGzipAcceptance(bufp, hdr_loc, creq);
605 }
606}
607
608static void
609parseQueryParameters(const char *query, int query_len, ClientRequest &creq)

Callers 1

handleReadRequestHeaderFunction · 0.85

Calls 5

TSUrlHttpQueryGetFunction · 0.85
getDefaultBucketFunction · 0.85
parseQueryParametersFunction · 0.85
TSHttpTxnClientAddrGetFunction · 0.85
checkGzipAcceptanceFunction · 0.85

Tested by

no test coverage detected