Add a set-http-cntl operator for header_rewrite#8375
Conversation
|
Example usage could be something like this, for a 10% log sampling rate: |
|
Here's a list of existing APIs that could be moved into this generic one: |
|
Would it be hard to added testing for this to pluginTest/header_rewrite/header_rewrite.test.py or add a new test? |
Dunno, I think so? It'd have to setup logging, as well as verifying that the logging is happening or not happening? Just take my word for it, I mean, if I were wrong (in the code) don't you think I would know it? |
ywkaras
left a comment
There was a problem hiding this comment.
It's all about trust, not testing. We must all swim naked together in volcanic hot springs in Iceland ASAP to build trust.
|
[approve ci] |
1 similar comment
|
[approve ci] |
f3479ab to
65ae442
Compare
|
[approve ci clang-analyzer] |
65ae442 to
e4a9d26
Compare
e28e69c to
fe80d29
Compare
|
I rewrote / updated this to be more generic, now that we landed the new API as well. |
fe80d29 to
472fe88
Compare
This supports all the controllers that the InkAPI supports,
unclear if all or any of them are useful here. But the LOGGING
controller definitely is.
LOGGING TS_HTTP_CNTL_LOGGING_MODE
INTERCEPT_RETRY TS_HTTP_CNTL_INTERCEPT_RETRY_MODE
RESP_CACHEABLE TS_HTTP_CNTL_RESPONSE_CACHEABLE
REQ_CACHEABLE TS_HTTP_CNTL_REQUEST_CACHEABLE
SERVER_NO_STORE TS_HTTP_CNTL_SERVER_NO_STORE
TXN_DEBUG TS_HTTP_CNTL_TXN_DEBUG
SKIP_REMAP TS_HTTP_CNTL_SKIP_REMAPPING
472fe88 to
d04b5ec
Compare
|
|
||
| set-http-cntl | ||
| ~~~~~~~~~~~~~ | ||
| ;; |
There was a problem hiding this comment.
Is this some sphinx voodoo or are you just winking at us twice?
|
|
||
| private: | ||
| bool _flag = false; | ||
| TSHttpCntlType _cntl_qual; |
There was a problem hiding this comment.
Hmm seems pointless to initialize one of these and not the other.
This supports all the controllers that the InkAPI supports,
unclear if all or any of them are useful here. But the LOGGING
controller definitely is.
LOGGING TS_HTTP_CNTL_LOGGING_MODE
INTERCEPT_RETRY TS_HTTP_CNTL_INTERCEPT_RETRY_MODE
RESP_CACHEABLE TS_HTTP_CNTL_RESPONSE_CACHEABLE
REQ_CACHEABLE TS_HTTP_CNTL_REQUEST_CACHEABLE
SERVER_NO_STORE TS_HTTP_CNTL_SERVER_NO_STORE
TXN_DEBUG TS_HTTP_CNTL_TXN_DEBUG
SKIP_REMAP TS_HTTP_CNTL_SKIP_REMAPPING
(cherry picked from commit 4547ed7)
|
Cherry-picked to v9.2.x |
* asf/9.2.x: Updated ChangeLog Marks tls_engine test as OpenSSL-only (apache#8509) Add skipped log entries to troubleshooting FAQ in docs. (apache#8507) Remove commented out EventProcessor::eventthread - it's time (apache#8517) Makes proxy_serve_stale version independent (apache#8508) Add proxy.config.http2.stream_error_sampling_threshold (apache#8506) url_sig: change cleanup msg from TSError to TSDebug (apache#8523) Adds the set-http-cntl operator for header_rewrite (apache#8375) Prevent bad ssl_multicert.config load from being swapped in (apache#8515)
This supports all the controllers that the new InkAPI supports, unclear if all or any of them are useful here. But the LOGGING controller definitely is.