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

Function ts_lua_http_get_parent_proxy

plugins/lua/ts_lua_http.cc:520–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520static int
521ts_lua_http_get_parent_proxy(lua_State *L)
522{
523 const char *hostname = nullptr;
524 int port = 0;
525 ts_lua_http_ctx *http_ctx;
526
527 GET_HTTP_CONTEXT(http_ctx, L);
528
529 TSHttpTxnParentProxyGet(http_ctx->txnp, &hostname, &port);
530
531 if (hostname == nullptr) {
532 lua_pushnil(L);
533 } else {
534 lua_pushstring(L, hostname);
535 }
536 lua_pushnumber(L, port);
537
538 return 2;
539}
540
541static int
542ts_lua_http_set_parent_proxy(lua_State *L)

Callers

nothing calls this directly

Calls 1

TSHttpTxnParentProxyGetFunction · 0.85

Tested by

no test coverage detected