fix: normalize SOAP carriage returns on import and UI rendering#1968
fix: normalize SOAP carriage returns on import and UI rendering#1968Caesarsage wants to merge 1 commit intomicrocks:1.13.xfrom
Conversation
Signed-off-by: caesarsage <[email protected]>
|
I have the week off and will be back Monday 2nd. |
lbroudoux
left a comment
There was a problem hiding this comment.
Is it possible to only handle this on client side to keep the imported artifact as the source of truth? I wouldn't expect changes on server side importer.
| response.setContent( | ||
| normalizeLineEndings(getConfigUniqueDirectChild(mockResponse, "responseContent").getTextContent())); |
There was a problem hiding this comment.
I would prefer not to change the imported content as it has to be "the source of truth". Couldn't we manage this only on client side?
| request.setName(testRequest.getAttribute(NAME_ATTRIBUTE)); | ||
| if (hasConfigDirectChild(testRequest, REQUEST_TAG)) { | ||
| request.setContent(getConfigUniqueDirectChild(testRequest, REQUEST_TAG).getTextContent()); | ||
| request |
There was a problem hiding this comment.
I would prefer not to change the imported content as it has to be "the source of truth". Couldn't we manage this only on client side?
| } | ||
|
|
||
| public formatRequestContent(requestContent: string): string { | ||
| const normalizedContent = normalizeLineEndings(requestContent); |
There was a problem hiding this comment.
Yes, if we're doing this here, there's no need to do it on server side IMO.
I just want to confirm: when you say client, do you specifically mean the JavaScript client? |
Yes, I mean on the JavaScript side only. IIRC, the problem we face is only for generating a correct CURL command - it does not impact mock features. So I would only change this part. |
Description
This prevents hidden carriage return anomalies in SOAP payload handling and display.
Related issue(s)
Fixes #1951