| 539 | } |
| 540 | |
| 541 | static int |
| 542 | ts_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 | |
| 567 | static int |
| 568 | ts_lua_http_get_parent_selection_url(lua_State *L) |
nothing calls this directly
no test coverage detected