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

Function ts_lua_http_set_parent_proxy

plugins/lua/ts_lua_http.cc:541–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541static int
542ts_lua_http_set_parent_proxy(lua_State *L)
543{
544 int n = 0;
545
546 ts_lua_http_ctx *http_ctx;
547
548 GET_HTTP_CONTEXT(http_ctx, L);
549
550 n = lua_gettop(L);
551
552 if (n == 2) {
553 const char *hostname;
554 size_t hostname_len;
555 int port = 0;
556
557 hostname = luaL_checklstring(L, 1, &hostname_len);
558 port = luaL_checkinteger(L, 2);
559 TSHttpTxnParentProxySet(http_ctx->txnp, hostname, port);
560 } else {
561 return luaL_error(L, "incorrect # of arguments for set_parent_proxy, receiving %d instead of 2", n);
562 }
563
564 return 0;
565}
566
567static int
568ts_lua_http_get_parent_selection_url(lua_State *L)

Callers

nothing calls this directly

Calls 1

TSHttpTxnParentProxySetFunction · 0.85

Tested by

no test coverage detected