bneradt commented on code in PR #12389:
URL: https://github.com/apache/trafficserver/pull/12389#discussion_r2237877504
##########
tools/hrw4u/src/symbols.py:
##########
@@ -29,19 +29,17 @@ class SymbolResolver:
"http.status.reason": ("set-status-reason",
Validator.quoted_or_simple(), False, None),
"http.status": ("set-status", Validator.range(0, 999), False, None),
"inbound.conn.dscp": ("set-conn-dscp", Validator.nbit_int(6), False,
None),
- "inbound.cookie.": (["rm-cookie", "set-cookie"],
Validator.quoted_or_simple(), False, None),
- "inbound.req.": (["rm-header", "set-header"],
Validator.quoted_or_simple(), False, None),
+ "inbound.cookie.": (["rm-cookie", "set-cookie"],
Validator.http_token(), False, None),
+ "inbound.req.": (["rm-header", "set-header"], Validator.http_token(),
False, None),
"inbound.resp.body": ("set-body", Validator.quoted_or_simple(), False,
None),
- "inbound.resp.": (["rm-header", "set-header"],
Validator.quoted_or_simple(), False, None),
+ "inbound.resp.": (["rm-header", "set-header"], Validator.http_token(),
False, None),
"inbound.status.reason": ("set-status-reason", Validator.range(0,
999), False, None),
"inbound.status": ("set-status", Validator.range(0, 999), False, None),
- "inbound.url.": (["rm-destination", "set-destination"],
Validator.quoted_or_simple(), True, None),
- "outbound.cookie.": (["rm-cookie", "set-cookie"],
Validator.quoted_or_simple(), False, None),
- "outbound.req.": (["rm-header", "set-header"],
Validator.quoted_or_simple(), False, {"PRE_REMAP", "REMAP", "READ_REQUEST"}),
+ "inbound.url.": (["rm-destination", "set-destination"],
Validator.suffix_group(types.SuffixGroup.URL_FIELDS), True, None),
+ "outbound.cookie.": (["rm-cookie", "set-cookie"],
Validator.http_token(), False, None),
+ "outbound.req.": (["rm-header", "set-header"], Validator.http_token(),
False, {"PRE_REMAP", "REMAP", "READ_REQUEST"}),
"outbound.resp.":
- (
- ["rm-header",
- "set-header"], Validator.quoted_or_simple(), False,
{"PRE_REMAP", "REMAP", "READ_REQUEST", "SEND_REQUEST"}),
+ (["rm-header", "set-header"], Validator.http_token(), False,
{"PRE_REMAP", "REMAP", "READ_REQUEST", "SEND_REQUEST"}),
"outbound.status.reason": ("set-status-reason", Validator.range(0,
999), False, {"PRE_REMAP", "REMAP", "READ_REQUEST"}),
"outbound.status": ("set-status", Validator.range(0, 999), False,
{"PRE_REMAP", "REMAP", "READ_REQUEST"}),
}
Review Comment:
The change looks fine, but is this Validator for `set-status-reason`
correct? Should that be alpha-numeric? I assume `set-status` takes something
like a `200`, while the reason is `OK`?
--
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]