This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 197b3ac58154794445c9909311080a18df4a2ef4 Author: David Calavera <[email protected]> AuthorDate: Wed Oct 9 21:55:43 2019 -0700 Move TSHttpTxnServerPush to the stable API interface. Signed-off-by: David Calavera <[email protected]> (cherry picked from commit b58fcfd326c9a1ecb3f9103da838fbf17eb2afb8) --- doc/developer-guide/api/functions/TSHttpTxnServerPush.en.rst | 8 +------- example/plugins/c-api/server_push/server_push.c | 1 - include/ts/experimental.h | 2 -- include/ts/ts.h | 9 +++++++++ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/developer-guide/api/functions/TSHttpTxnServerPush.en.rst b/doc/developer-guide/api/functions/TSHttpTxnServerPush.en.rst index 3e43cd2..be9ba1d 100644 --- a/doc/developer-guide/api/functions/TSHttpTxnServerPush.en.rst +++ b/doc/developer-guide/api/functions/TSHttpTxnServerPush.en.rst @@ -26,7 +26,7 @@ Synopsis .. code-block:: cpp - #include <ts/experimental.h> + #include <ts/ts.h> .. function:: void TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len) @@ -40,12 +40,6 @@ is not disabled by the client. You can call this API without checking whether Server Push is available on the transaction and it does nothing if Server Push is not available. - -Notes -===== - -This API may be changed in the future version since it is experimental. - See Also ======== diff --git a/example/plugins/c-api/server_push/server_push.c b/example/plugins/c-api/server_push/server_push.c index 41203f5..c921269 100644 --- a/example/plugins/c-api/server_push/server_push.c +++ b/example/plugins/c-api/server_push/server_push.c @@ -36,7 +36,6 @@ #include <ctype.h> #include "ts/ts.h" -#include "ts/experimental.h" #include "tscore/ink_defs.h" const char *PLUGIN_NAME = "server_push"; diff --git a/include/ts/experimental.h b/include/ts/experimental.h index fa8e7ea..88b7a1d 100644 --- a/include/ts/experimental.h +++ b/include/ts/experimental.h @@ -223,8 +223,6 @@ tsapi TSReturnCode TSHttpTxnUpdateCachedObject(TSHttpTxn txnp); ****************************************************************************/ tsapi int TSHttpTxnLookingUpTypeGet(TSHttpTxn txnp); -tsapi void TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len); - /* ip addr parsing */ tsapi TSReturnCode TSIpStringToAddr(const char *str, size_t str_len, struct sockaddr *addr); diff --git a/include/ts/ts.h b/include/ts/ts.h index 60828f9..17748d4 100644 --- a/include/ts/ts.h +++ b/include/ts/ts.h @@ -2535,6 +2535,15 @@ tsapi TSReturnCode TSRemapToUrlGet(TSHttpTxn txnp, TSMLoc *urlLocp); */ tsapi TSIOBufferReader TSHttpTxnPostBufferReaderGet(TSHttpTxn txnp); +/** + * Initiate an HTTP/2 Server Push preload request. + * Use this api to register a URL that you want to preload with HTTP/2 Server Push. + * + * @param url the URL string to preload. + * @param url_len the length of the URL string. + */ +tsapi void TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len); + #ifdef __cplusplus } #endif /* __cplusplus */
