Skip to content

Commit

Permalink
Fix deep search for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Oct 11, 2024
1 parent 9748b42 commit c102aaa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fix crash when exporting HAR file by @rounak in https://github.com/kean/Pulse/pull/299
- Fix concurrency issue in `StoreDetailsViewModel` by @ejensen in https://github.com/kean/Pulse/pull/302
- Update the deep search. It will now show all search scopes found and only one match per scope. You can tap on a match to see the scope with a prepopulated search query to see the remaining items.
- Fix an issue with deep search not working for request and response headers

## Pulse 5.1.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,22 @@ final class ConsoleSearchOperation {
if let string = task.requestBody.flatMap(service.getBodyString) {
occurrences += ConsoleSearchOperation.search(string, term, scope)
}
case .originalRequestHeaders, .currentRequestHeaders, .responseHeaders:
break // Reserved
case .originalRequestHeaders:
if let headers = task.originalRequest?.httpHeaders {
occurrences += ConsoleSearchOperation.search(headers, term, scope)
}
case .currentRequestHeaders:
if let headers = task.currentRequest?.httpHeaders {
occurrences += ConsoleSearchOperation.search(headers, term, scope)
}
case .responseBody:
if let string = task.responseBody.flatMap(service.getBodyString) {
occurrences += ConsoleSearchOperation.search(string, term, scope)
}
case .responseHeaders:
if let headers = task.response?.httpHeaders {
occurrences += ConsoleSearchOperation.search(headers, term, scope)
}
case .message, .metadata:
break // Applies only to LoggerMessageEntity
}
Expand Down

0 comments on commit c102aaa

Please sign in to comment.