This is an automated email from the ASF dual-hosted git repository.
bneradt 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 8a3c1bff92 multiplexer: set up transforms for PUT requests (#10963)
8a3c1bff92 is described below
commit 8a3c1bff92b0a39d8285e07e49d208876aafaf09
Author: Brian Neradt <[email protected]>
AuthorDate: Thu Jan 4 15:34:30 2024 -0600
multiplexer: set up transforms for PUT requests (#10963)
Without this change, multiplexer handling of PUT requests only work for
very small bodies. This sets up the transform for PUT like we do for
POST. A future commit for large PUT/POST bodies will contain a test for
this. In the meantime, this at least connects up the transform for PUT
requests.
---
plugins/multiplexer/ats-multiplexer.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/multiplexer/ats-multiplexer.cc
b/plugins/multiplexer/ats-multiplexer.cc
index d684aab7ab..69121da8ec 100644
--- a/plugins/multiplexer/ats-multiplexer.cc
+++ b/plugins/multiplexer/ats-multiplexer.cc
@@ -143,7 +143,8 @@ DoRemap(const Instance &i, TSHttpTxn t)
generateRequests(i.origins, buffer, location, requests);
assert(requests.size() == i.origins.size());
- if (length == TS_HTTP_LEN_POST && memcmp(TS_HTTP_METHOD_POST, method,
TS_HTTP_LEN_POST) == 0) {
+ if ((length == TS_HTTP_LEN_POST && memcmp(TS_HTTP_METHOD_POST, method,
TS_HTTP_LEN_POST) == 0) ||
+ (length == TS_HTTP_LEN_PUT && memcmp(TS_HTTP_METHOD_PUT, method,
TS_HTTP_LEN_PUT) == 0)) {
const TSVConn vconnection = TSTransformCreate(handlePost, t);
assert(vconnection != nullptr);
TSContDataSet(vconnection, new PostState(requests));