You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2024/06/04 23:10:19 UTC
[PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
zwoop opened a new pull request, #11417:
URL: https://github.com/apache/trafficserver/pull/11417
This also adds some new mechanisms to some Cripts core, and updates documentation as well.
Note: This does not handle all HRW conditions yet, rather, I think we can add them as people have need for them.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #11417:
URL: https://github.com/apache/trafficserver/pull/11417#discussion_r1628071490
##########
src/cripts/Bundles/Headers.cc:
##########
@@ -0,0 +1,183 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#include "cripts/Lulu.hpp"
+#include "cripts/Preamble.hpp"
+#include "cripts/Bundles/Headers.hpp"
+
+namespace
+{
+enum HeaderTargets : uint8_t {
+ NONE,
+ CLIENT_REQUEST,
+ CLIENT_RESPONSE,
+ SERVER_REQUEST,
+ SERVER_RESPONSE,
+};
+
+HeaderTargets
+header_target(const Cript::string_view &target)
+{
+ if (target == "Client::Request") {
+ return CLIENT_REQUEST;
+ } else if (target == "Client::Response") {
+ return CLIENT_RESPONSE;
+ } else if (target == "Server::Request") {
+ return SERVER_REQUEST;
+ } else if (target == "Server::Response") {
+ return SERVER_RESPONSE;
+ }
+
+ return NONE;
+}
+
+} // namespace
+
+namespace Bundle
+{
+const Cript::string Headers::_name = "Bundle::Headers";
+
+bool
+Headers::validate(std::vector<Cript::Bundle::Error> &errors) const
+{
+ bool failed = false;
+ // errors.emplace_back("dscp must be between 0 and 63", name(), "dscp");
+ // failed = true;
Review Comment:
fixed / removed, it was a remnant.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11417:
URL: https://github.com/apache/trafficserver/pull/11417#issuecomment-2150466677
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #11417:
URL: https://github.com/apache/trafficserver/pull/11417
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #11417:
URL: https://github.com/apache/trafficserver/pull/11417#issuecomment-2150696691
Cherry-picked to v10.0.x
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Adds a bridge betwen Cripts and HRW operators [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on code in PR #11417:
URL: https://github.com/apache/trafficserver/pull/11417#discussion_r1627990093
##########
src/cripts/Bundles/Headers.cc:
##########
@@ -0,0 +1,183 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#include "cripts/Lulu.hpp"
+#include "cripts/Preamble.hpp"
+#include "cripts/Bundles/Headers.hpp"
+
+namespace
+{
+enum HeaderTargets : uint8_t {
+ NONE,
+ CLIENT_REQUEST,
+ CLIENT_RESPONSE,
+ SERVER_REQUEST,
+ SERVER_RESPONSE,
+};
+
+HeaderTargets
+header_target(const Cript::string_view &target)
+{
+ if (target == "Client::Request") {
+ return CLIENT_REQUEST;
+ } else if (target == "Client::Response") {
+ return CLIENT_RESPONSE;
+ } else if (target == "Server::Request") {
+ return SERVER_REQUEST;
+ } else if (target == "Server::Response") {
+ return SERVER_RESPONSE;
+ }
+
+ return NONE;
+}
+
+} // namespace
+
+namespace Bundle
+{
+const Cript::string Headers::_name = "Bundle::Headers";
+
+bool
+Headers::validate(std::vector<Cript::Bundle::Error> &errors) const
+{
+ bool failed = false;
+ // errors.emplace_back("dscp must be between 0 and 63", name(), "dscp");
+ // failed = true;
Review Comment:
This function seems unfinished.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org