-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Record&Replay - Support for multipart/related without Content-Disposition headers #2264
base: master
Are you sure you want to change the base?
Conversation
…n headers - recording and replaying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds about right from the code. I haven't tested it, but the potential impact is isolated enough
@@ -421,7 +421,7 @@ public void decompressesGzippedResponseBodyAndRemovesContentEncodingHeader() { | |||
+ " \"url\": \"/multipart/content\", \n" | |||
+ " \"multipartPatterns\" : [ { \n" | |||
+ " \"name\" : \"binaryFile\", \n" | |||
+ " \"matchingType\" : \"ALL\", \n" | |||
+ " \"matchingType\" : \"ANY\", \n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there's an example of mis-match in src/test/java/com/github/tomakehurst/wiremock/matching/RequestPatternTest.java#doesNotMatchExactlyWhenManyMultipartPatternsSupposeToMatchAllDistinctParts()
that test is using the default value which is to match ALL parts.
It was changed in the recorder to match ANY part in src/main/java/com/github/tomakehurst/wiremock/stubbing/StubMappingJsonRecorder.java:102
This fixes the (now deprecated) legacy recorder, which we'll be removing soon. Does this issue affect the current recorder, and if so could we fix it there instead? |
Thanks. Where can I find the new and improved recorder? |
|
looking. |
This one can't be executed in a standalone version, can it? |
If this is what I think it is ( Line 73 in 5f0677f
|
Unless we can copy the same logic wiremock/src/main/java/com/github/tomakehurst/wiremock/stubbing/StubMappingJsonRecorder.java Line 86 in 5f0677f
into here: wiremock/src/main/java/com/github/tomakehurst/wiremock/recording/RequestPatternTransformer.java Line 58 in 5f0677f
|
Not too sure what's the significance of this one: Line 73 in 5f0677f
|
Yes it can, but you start it via an API call or from the recorder UI page, rather than via the CLI. |
Thank you for your response. |
@hladysz @tomakehurst I guess this PR is a no-go since the old recorder is now deprecated, right? |
I've contributed my time fixing the bug, but would need some help fixing
the architecture. I think at the moment the other recorder is missing more
than the functionality I've fixed. Looks like it wasn't kept up to date
with the old one for a while now.
pon., 28 sie 2023 o 09:06 Oleg Nenashev ***@***.***>
napisał(a):
… @hladysz <https://github.com/hladysz> @tomakehurst
<https://github.com/tomakehurst> I guess this PR is a no-go since the old
recorder is now deprecated, right?
—
Reply to this email directly, view it on GitHub
<#2264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADIING2ZQL5GUGSY32VSFTXXRGPNANCNFSM6AAAAAA2HUCR4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks @hladysz . I will review it with the team |
Support for multipart/related without Content-Disposition headers - recording and replaying
References
Submitter checklist