JosiahWI commented on code in PR #12614:
URL: https://github.com/apache/trafficserver/pull/12614#discussion_r2466101219


##########
plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc:
##########
@@ -225,9 +225,17 @@ jws_parsing_helper(const char *uri, const char *paramName, 
const char *expected_
   cjose_jws_t *jws = get_jws_from_uri(uri, uri_ct, paramName, uri_strip, 
uri_ct, &strip_ct);
   if (jws) {
     resp = true;
-    if (strcmp(uri_strip, expected_strip) != 0) {
-      cjose_jws_release(jws);
-      resp = false;
+    if (expected_strip != nullptr) {
+      if (strcmp(uri_strip, expected_strip) != 0) {
+        cjose_jws_release(jws);
+        resp = false;
+      }
+    } else {
+      // expected_strip == nullptr means we expect uri_strip to be empty
+      if (uri_strip[0] != '\0') {
+        cjose_jws_release(jws);
+        resp = false;
+      }

Review Comment:
   What's the reason for adding this new behavior?



-- 
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]

Reply via email to