You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2019/06/17 23:08:57 UTC

[trafficserver] branch master updated: Update lua.en.rst

This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 188879f  Update lua.en.rst
188879f is described below

commit 188879f7d49ce80ee0717f608bbbf7fe22eac970
Author: Kit Chan <ki...@apache.org>
AuthorDate: Sat Jun 15 23:58:32 2019 -0700

    Update lua.en.rst
---
 doc/admin-guide/plugins/lua.en.rst | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/doc/admin-guide/plugins/lua.en.rst b/doc/admin-guide/plugins/lua.en.rst
index c2476c0..4ee716a 100644
--- a/doc/admin-guide/plugins/lua.en.rst
+++ b/doc/admin-guide/plugins/lua.en.rst
@@ -696,7 +696,7 @@ ts.client_request.get_url
 
 **context:** do_remap/do_os_response or do_global_* or later
 
-**description:** This function can be used to retrieve the whole client request's url.
+**description:** This function can be used to retrieve the client request url (:func:`TSHttpTxnEffectiveUrlStringGet`).
 
 Here is an example:
 
@@ -707,6 +707,25 @@ Here is an example:
         ts.debug(url)
     end
 
+`TOP <#lua-plugin>`_
+
+ts.client_request.get_pristine_url
+----------------------------------
+**syntax:** *ts.client_request.get_pristine_url()*
+
+**context:** do_remap/do_os_response or do_global_* or later
+
+**description:** This function can be used to retrieve the client request pristine url.
+
+Here is an example:
+
+::
+
+    function do_remap()
+        local url = ts.client_request.get_pristine_url()
+        ts.debug(url)
+    end
+
 Then ``GET /st?a=1&b=2 HTTP/1.1\r\nHost: a.tbcdn.cn\r\n...`` will yield the output:
 
 ``http://a.tbcdn.cn/st?a=1&b=2``