-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exim: Use har-reader #5250
exim: Use har-reader #5250
Conversation
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
e6a80ec
to
87db368
Compare
87db368
to
729cc5c
Compare
Removed the inner classes, still need to tweak the HTTP Version handling. |
729cc5c
to
36aefe2
Compare
I've adjusted the version handling now. I believe this now has all the previously discussed changes. |
addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/ui/ProgressPaneListener.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
I'd do a final review later in the day. |
36aefe2
to
6364ea0
Compare
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/MenuImportHar.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
6364ea0
to
ae150b5
Compare
I think I got all the comments, just need to add tests. Please lemme know if I've missed something. |
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarImporter.java
Outdated
Show resolved
Hide resolved
092c58a
to
bd49ab6
Compare
I started to add tests. There were a number of challenges. I'll add some comments to cover those. The tests will fail, they succeed individually but there seems to be some sort of concurrency or cleanup issue when run together. |
addOns/exim/src/test/java/org/zaproxy/addon/exim/har/HarImporterUnitTest.java
Outdated
Show resolved
Hide resolved
addOns/exim/src/test/java/org/zaproxy/addon/exim/har/HarImporterUnitTest.java
Outdated
Show resolved
Hide resolved
The logger should be set up for each test not all of them, also better to call |
67a8efc
to
98d875f
Compare
I was not clear with #5250 (comment) I meant that the logger should be initialised in a |
Okay I've updated a bunch of stuff. Things are a bit better. The log handling was ripped off from GraphQL tests. I had to put your reconfigure suggestion in each method because Using mockMessages didn't seem to fix the console barf, the key is there so I don't get the issue.... Can you think of another place we've done mocking to handle persisting messages? I think I recall talking about this for another PR but I can't figure out what it was. |
98d875f
to
3a3f8fb
Compare
The log reset should be done after each test. Let me look.
|
1961879
to
4279b38
Compare
Getting closer... 🤷♂️ |
4279b38
to
d3ef666
Compare
Some of those comments might be ordered poorly, I didn't realize I hadn't finished my comments/review on Friday |
0b0b2b7
to
320a127
Compare
I dropped the header pre-processing. The examples I had only impacted responses. Not sure if I should handle requests similarly? |
I'm good if done only to responses. |
320a127
to
11e8b4e
Compare
I think/hope this is ready for review. I moved the remainder of the core HarUtils code here and commented it out. I'll work on writing/export in another PR. |
I don't think we should be copying commented code that applies to the older library, why not just apply the changes when needed instead? |
Okay, I can just add a TODO if preferred |
Just a TODO is better IMO. |
11e8b4e
to
81187c9
Compare
Done & done |
addOns/exim/src/main/java/org/zaproxy/addon/exim/har/HarUtils.java
Outdated
Show resolved
Hide resolved
81187c9
to
012ae5e
Compare
Done |
Thank you! |
387205e
to
fb40f89
Compare
- CHANGELOG > Added change note. - build file > Updated/added dependencies. - HarImporter > Re-worked to use har-reader lib. - HarUtils > Added to to facilitate use of the new lib. - MenuImportHar > Re-worked and simplified to take advantage of the new utils, importer, and lib. - HarImporterUnitTest > Tweaked to accommodate HarImporter changes. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
fb40f89
to
5030858
Compare
Overview
Related Issues
Checklist
./gradlew spotlessApply
for code formatting