Skip to content

Refactors and promotes the Txn Control mechanism with Get() and Set()#8428

Merged
zwoop merged 7 commits intoapache:masterfrom
zwoop:PromoteAPI
Oct 17, 2021
Merged

Refactors and promotes the Txn Control mechanism with Get() and Set()#8428
zwoop merged 7 commits intoapache:masterfrom
zwoop:PromoteAPI

Conversation

@zwoop
Copy link
Contributor

@zwoop zwoop commented Oct 14, 2021

This adds:

tsapi bool TSHttpTxnCntlGet(TSHttpTxn txnp, TSHttpCntlType ctrl);
tsapi TSReturnCode TSHttpTxnCntlSet(TSHttpTxn txnp, TSHttpCntlType ctrl, bool data);
typedef enum {
  TS_HTTP_CNTL_LOGGING_MODE,
  TS_HTTP_CNTL_INTERCEPT_RETRY_MODE,
  TS_HTTP_CNTL_RESPONSE_CACHEABLE,
  TS_HTTP_CNTL_REQUEST_CACHEABLE,
  TS_HTTP_CNTL_SERVER_NO_STORE,
  TS_HTTP_CNTL_TXN_DEBUG,
  TS_HTTP_CNTL_SKIP_REMAPPING
} TSHttpCntlType;

zwoop added 5 commits October 14, 2021 15:39
This adds

tsapi bool TSHttpTxnCntlGet(TSHttpTxn txnp, TSHttpCntlType ctrl);
tsapi TSReturnCode TSHttpTxnCntlSet(TSHttpTxn txnp, TSHttpCntlType ctrl, bool data);
This adds

  TS_HTTP_CNTL_RESPONSE_CACHEABLE
  TS_HTTP_CNTL_REQUEST_CACHEABLE
  TS_HTTP_CNTL_SERVER_NO_STORE
This adds

  TS_HTTP_CNTL_TXN_DEBUG
This adds

  TS_HTTP_CNTL_SKIP_REMAPPING
@zwoop zwoop added the TS API label Oct 14, 2021
@zwoop zwoop added this to the 10.0.0 milestone Oct 14, 2021
@zwoop zwoop requested a review from bryancall as a code owner October 14, 2021 22:34
@zwoop zwoop self-assigned this Oct 14, 2021
@ezelkow1
Copy link
Member

[approve ci docs]

permissions and limitations under the License.


TSHttpTxnClientFdGet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, typo, will fix.

@shukitchan
Copy link
Contributor

I can help to write something in the lua document if you want.

@shukitchan
Copy link
Contributor

Also should we mark some of the existing APIs to be deprecated (and will be deprecated in the next next release)?

e.g. TSHttpTxnDebugSet(TSHttpTxn txnp, int on)

@zwoop
Copy link
Contributor Author

zwoop commented Oct 15, 2021

@shukitchan yes, we will deprecate the old APIs, but I want to do that in a separate PR, which will only go into the 10-Dev branch. I'm making another change right now to replace the core plugins with this new API as well.

@zwoop
Copy link
Contributor Author

zwoop commented Oct 15, 2021

Please take extra care reviewing the last commit in particular, make sure I didn't mess up any of the plugins etc.

Copy link
Contributor

@shukitchan shukitchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@shukitchan
Copy link
Contributor

I will create a PR with lua doc updates once this is merged

@zwoop zwoop merged commit 6e10cdc into apache:master Oct 17, 2021
@zwoop zwoop deleted the PromoteAPI branch October 17, 2021 15:33
zwoop added a commit that referenced this pull request Nov 8, 2021
…#8428)

* Promote TSHttpTxnCntl to stable ts.h

* Refactor the TSHttpTxnCntl() API into explicit GET/SET

This adds

tsapi bool TSHttpTxnCntlGet(TSHttpTxn txnp, TSHttpCntlType ctrl);
tsapi TSReturnCode TSHttpTxnCntlSet(TSHttpTxn txnp, TSHttpCntlType ctrl, bool data);

* Adds support for the API controlled cacheable flags

This adds

  TS_HTTP_CNTL_RESPONSE_CACHEABLE
  TS_HTTP_CNTL_REQUEST_CACHEABLE
  TS_HTTP_CNTL_SERVER_NO_STORE

* Adds support for the TXN debug flag

This adds

  TS_HTTP_CNTL_TXN_DEBUG

* Adds the control feature for turning off remapping

This adds

  TS_HTTP_CNTL_SKIP_REMAPPING

* Adds docs for new TSHttpTxnCntlGet/Set APIs

* Updates all core plugins to use the new API

(cherry picked from commit 6e10cdc)
@zwoop
Copy link
Contributor Author

zwoop commented Nov 8, 2021

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Nov 8, 2021
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Mar 17, 2022
* asf/9.2.x: (50 commits)
  Updated ChangeLog
  Reject Transfer-Encoding in pre-HTTP/1.1 requests (apache#8451)
  Better TLS Secrets Truncation. (apache#8489)
  ssl_secret debug printing: print only the first 50 bytes (apache#8483)
  Define TS_HTTP_VALUE_BROTLI and TS_HTTP_LEN_BROTLI (apache#8477)
  Fix case of brotli (apache#8476)
  TSSslSecretSet: Update SSL_CTX TLS Secrets (apache#8368)
  Adding doc/README.md (apache#8420)
  Doc: fix typos in Strategy documentation (apache#8408)
  Refactors and promotes the Txn Control mechanism with Get() and Set() (apache#8428)
  tests: Add shbang to python scripts with a main (apache#8430)
  Remove empty tests/unit_tests directoy+makefile (apache#8429)
  Adds new API: TSVConnSslSniGet (apache#8313)
  rate_limit: convert to using TSVConnSslSniGet (apache#8414)
  Update the Multiplexer Docs for Multplexed HTTPS Connections (apache#8440)
  bigobj: use automake to build test utilities (apache#8441)
  Make sni.yaml errors cause an unrecoverable TS crash at startup. (apache#8208)
  Fix timeout checks of NetHandler::manage_active_queue() (apache#8287)
  Fix Multiplexer POST/PUT Body Handling (apache#8439)
  Document proxy.config.memory.max_usage (apache#8450)
  ...
@jpeach jpeach mentioned this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants