Skip to content

fix: normalize SOAP carriage returns on import and UI rendering - #1968

Merged
lbroudoux merged 2 commits into
microcks:1.13.xfrom
Caesarsage:fix-1951
Mar 4, 2026
Merged

lbroudoux merged 2 commits into
microcks:1.13.xfrom
Caesarsage:fix-1951

Conversation

@Caesarsage

Copy link
Copy Markdown
Contributor

Description

  • Normalize \r\n / \r to \n during SoapUI import in SoapUIProjectImporter so persisted request/response payloads are clean.
  • Add regression test testCRLFPayloadsAreNormalizedOnImport with a CRLF fixture SoapUI project.
  • Add UI safety-net normalization in Service Detail display path using normalizeLineEndings from format-utils.

This prevents hidden carriage return anomalies in SOAP payload handling and display.

Related issue(s)

Fixes #1951

@Caesarsage

Copy link
Copy Markdown
Contributor Author

cc @SebastienDegodez @lbroudoux

@lbroudoux

Copy link
Copy Markdown
Member

cc @SebastienDegodez @lbroudoux

I have the week off and will be back Monday 2nd.

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SebastienDegodez

Copy link
Copy Markdown
Member

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.

I just want to confirm: when you say client, do you specifically mean the JavaScript client?
If so, wouldn’t the same issue still occur when uploading through the REST API (e.g., via the test container), since the server-side importer wouldn’t change?

@lbroudoux

Copy link
Copy Markdown
Member

I just want to confirm: when you say client, do you specifically mean the JavaScript client? If so, wouldn’t the same issue still occur when uploading through the REST API (e.g., via the test container), since the server-side importer wouldn’t change?

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.

@Caesarsage

Copy link
Copy Markdown
Contributor Author

kindly take another look @lbroudoux

@lbroudoux lbroudoux left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @Caesarsage for the quick changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Carriage return characters (\r) in SOAP payloads cause validation errors

3 participants