thebadpete commented on a change in pull request #7233:
URL: https://github.com/apache/trafficserver/pull/7233#discussion_r499962139
##########
File path: plugins/multiplexer/ats-multiplexer.cc
##########
@@ -131,19 +145,24 @@ DoRemap(const Instance &i, TSHttpTxn t)
TSDebug(PLUGIN_TAG, "Method is %s.", std::string(method, length).c_str());
- if (length == TS_HTTP_LEN_POST && memcmp(TS_HTTP_METHOD_POST, method,
TS_HTTP_LEN_POST) == 0) {
- const TSVConn vconnection = TSTransformCreate(handlePost, t);
- assert(vconnection != nullptr);
- TSContDataSet(vconnection, new PostState(requests));
- assert(requests.empty());
- TSHttpTxnHookAdd(t, TS_HTTP_REQUEST_TRANSFORM_HOOK, vconnection);
+ if (skip_post_put && ((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))) {
+ TSHandleMLocRelease(buffer, TS_NULL_MLOC, location);
} else {
- dispatch(requests, timeout);
- }
+ if (length == TS_HTTP_LEN_POST && memcmp(TS_HTTP_METHOD_POST, method,
TS_HTTP_LEN_POST) == 0) {
Review comment:
@shukitchan not sure what you meant but we need to extract the request
method for comparisons regardless of skip_post_put, if this is what you meant
by field creations? Is there another way to find out the request method without
TSHttpHdrMethodGet()?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]