Пример #1
0
static int
ts_lua_http_is_internal_request(lua_State *L)
{
  ts_lua_http_ctx *http_ctx;

  GET_HTTP_CONTEXT(http_ctx, L);

  if (TSHttpTxnIsInternal(http_ctx->txnp)) {
    lua_pushnumber(L, 1);
  } else {
    lua_pushnumber(L, 0);
  }

  return 1;
}
Пример #2
0
static int
ts_lua_http_is_internal_request(lua_State *L)
{
  TSReturnCode ret;
  ts_lua_http_ctx *http_ctx;

  GET_HTTP_CONTEXT(http_ctx, L);

  ret = TSHttpTxnIsInternal(http_ctx->txnp);

  if (ret == TS_SUCCESS) {
    lua_pushnumber(L, 1);

  } else {
    lua_pushnumber(L, 0);
  }

  return 1;
}