shukitchan commented on code in PR #10359:
URL: https://github.com/apache/trafficserver/pull/10359#discussion_r1320511701
##########
plugins/experimental/wasm/ats_context.cc:
##########
@@ -1325,6 +1331,10 @@ Context::getProperty(std::string_view path, std::string
*result)
int64_t total = h_bytes + b_bytes;
result->assign(reinterpret_cast<const char *>(&total), sizeof(int64_t));
return WasmResult::Ok;
+ } else if (path.substr(0, p_txn_is_internal.size()) == p_txn_is_internal) {
+ int internal = TSHttpTxnIsInternal(txnp_);
+ result->assign(reinterpret_cast<const char *>(&internal), sizeof(int));
+ return WasmResult::Ok;
Review Comment:
I am actually thinking of using foreign function instead for this. e.g. in
envoy it has "compress and "uncompress" foreign function exposed to wasm
modules.
This is how it is defined -
https://github.com/envoyproxy/envoy/blob/d12d47b05a832ce04d9130a869fa72f7ddbcef28/source/extensions/common/wasm/foreign.cc#L43
This is how it is used -
https://github.com/envoyproxy/envoy/blob/d12d47b05a832ce04d9130a869fa72f7ddbcef28/test/extensions/common/wasm/test_data/test_cpp.cc#L158
Please take a look and see if we can implement this using foreign function
##########
plugins/experimental/wasm/ats_context.cc:
##########
@@ -565,11 +565,17 @@ Context::httpCall(std::string_view target, const Pairs
&request_headers, std::st
path = value;
} else if (key == ":authority") {
authority = value;
+ } else if (key == ":protocol") {
Review Comment:
It should be ":scheme" instead according to
https://portswigger.net/burp/documentation/desktop/http2/http2-basics-for-burp-users
Please check out the section in pseudo-headers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]