Skip to content

Commit b6fa171

Browse files
committed
Fix utility method so more 'standard' headers are filtered out when trying to identify the custom header for test cases that use that.
1 parent 59c51a0 commit b6fa171

File tree

1 file changed

+19
-11
lines changed
  • src/main/java/org/owasp/benchmark/helpers

1 file changed

+19
-11
lines changed

src/main/java/org/owasp/benchmark/helpers/Utils.java

+19-11
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,32 @@ public class Utils {
6666
// A 'test' directory that target test files are created in so test cases can use them
6767
public static final String TESTFILES_DIR = USERDIR + "testfiles" + File.separator;
6868

69-
// This constant is used by one of the sources for Benchmark 1.2, but not in 1.3+
69+
// This constant is used by one of the sources for Benchmark 1.2, but not in 1.3+.
70+
// It is used to filter out common headers. Whatever is left is considered the custom header
71+
// name for header names test cases
7072
public static final Set<String> commonHeaders =
7173
new HashSet<>(
7274
Arrays.asList(
73-
"host",
74-
"user-agent",
7575
"accept",
76-
"accept-language",
7776
"accept-encoding",
78-
"content-type",
79-
"x-requested-with",
80-
"referer",
81-
"content-length",
82-
"connection",
83-
"pragma",
77+
"accept-language",
8478
"cache-control",
79+
"connection",
80+
"content-length",
81+
"content-type",
82+
"cookie",
83+
"host",
8584
"origin",
86-
"cookie"));
85+
"pragma",
86+
"referer",
87+
"sec-ch-ua",
88+
"sec-ch-ua-mobile",
89+
"sec-ch-ua-platform",
90+
"sec-fetch-dest",
91+
"sec-fetch-mode",
92+
"sec-fetch-site",
93+
"user-agent",
94+
"x-requested-with"));
8795

8896
private static final DocumentBuilderFactory safeDocBuilderFactory =
8997
DocumentBuilderFactory.newInstance();

0 commit comments

Comments
 (0)