This is an automated email from the ASF dual-hosted git repository.
amc 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 338a04f Doc: TSHttpTxnServerReqGet
338a04f is described below
commit 338a04fa60c25b89ea0584bed8d371e899ff310f
Author: Alan M. Carroll <[email protected]>
AuthorDate: Mon Feb 4 09:10:30 2019 -0600
Doc: TSHttpTxnServerReqGet
---
.../api/functions/TSHttpTxnServerReqGet.en.rst | 23 +++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/doc/developer-guide/api/functions/TSHttpTxnServerReqGet.en.rst
b/doc/developer-guide/api/functions/TSHttpTxnServerReqGet.en.rst
index ad22251..f9cb31e 100644
--- a/doc/developer-guide/api/functions/TSHttpTxnServerReqGet.en.rst
+++ b/doc/developer-guide/api/functions/TSHttpTxnServerReqGet.en.rst
@@ -26,7 +26,28 @@ Synopsis
`#include <ts/ts.h>`
-.. function:: TSReturnCode TSHttpTxnServerReqGet(TSHttpTxn txnp, TSMBuffer *
bufp, TSMLoc * offset)
+.. function:: TSReturnCode TSHttpTxnServerReqGet(TSHttpTxn txnp, TSMBuffer *
bufp, TSMLoc * obj)
Description
===========
+
+Get the request |TS| is sending to the upstream (server) for the transaction
:arg:`txnp`.
+:arg:`bufp` and :arg:`obj` should be valid pointers to use as return values.
The call site could
+look something like ::
+
+ TSMBuffer mbuffer;
+ TSMLoc mloc;
+ if (TS_SUCCESS == TSHttpTxnServerReqGet(&mbuffer, &mloc)) {
+ /* Can use safely mbuffer, mloc for subsequent API calls */
+ } else {
+ /* mbuffer, mloc in an undefined state */
+ }
+
+This call returns :c:macro:`TS_SUCCESS` on success, and :c:macro:`TS_ERROR` on
failure. It is the
+caller's responsibility to see that :arg:`txnp` is a valid transaction.
+
+Once the request object is obtained, it can be used to access all of the
elements of the request,
+such as the URL, the header fields, etc. This is also the mechanism by which a
plugin can change the
+upstream request, if done before the request is sent (in or before
+:c:macro:`TS_HTTP_SEND_REQUEST_HDR_HOOK`). Note that for earlier hooks, the
request may not yet
+exist, in which case an error is returned.