File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,21 @@ import org.parosproxy.paros.network.HttpMessage
4
4
import org.parosproxy.paros.view.View
5
5
import org.zaproxy.zap.extension.search.SearchMatch
6
6
7
- class ReflectHighlight (private val reqRes : HttpMessage , private val tokens : List <String >) {
7
+ class ReflectHighlight (
8
+ private val reqRes : HttpMessage ,
9
+ private val headerTokens : List <String >,
10
+ private val bodyTokens : List <String >
11
+ ) {
8
12
9
- private val searchMatch: SearchMatch ? by lazy {
10
- searchMatcher(tokens )
13
+ private val searchMatch: Pair < SearchMatch ?, SearchMatch ?> by lazy {
14
+ Pair ( searchMatcher(headerTokens), searchMatcher(bodyTokens) )
11
15
}
12
16
13
17
fun highlight () {
14
- searchMatch?.let {
15
- View .getSingleton().responsePanel.highlightBody(it)
18
+ if (searchMatch.second != null ) {
19
+ View .getSingleton().responsePanel.highlightBody(searchMatch.second)
20
+ } else if (searchMatch.first != null ) {
21
+ View .getSingleton().responsePanel.highlightHeader(searchMatch.first)
16
22
}
17
23
}
18
24
You can’t perform that action at this time.
0 commit comments