| 518 | } |
| 519 | |
| 520 | static int |
| 521 | ts_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 | |
| 541 | static int |
| 542 | ts_lua_http_set_parent_proxy(lua_State *L) |
nothing calls this directly
no test coverage detected