reta commented on PR #1028:
URL: https://github.com/apache/cxf/pull/1028#issuecomment-1328150629
> > Also could you please try 3.5.4, we fix one of the `cid` regressions
>
> Yes, 3.5.4 has this defect as well
Apologies for delay @neseleznev , the best option I came up with looking
into the regression is to make `AttachmentSerializer` account for the fact that
domain part could be already encoded (by trying to decode it):
```
String[] address = attachmentId.split("@", 2);
if (address.length == 2) {
// See please AttachmentUtil::createContentID, the
domain part is URL encoded, try to decode it
final String decoded = tryDecode(address[1],
StandardCharsets.UTF_8);
if (!decoded.equalsIgnoreCase(address[1])) {
writer.write(address[0] + "@" + decoded);
} else {
writer.write(attachmentId);
}
} else {
writer.write(URLEncoder.encode(attachmentId,
StandardCharsets.UTF_8.name()));
}
```
I would really prefer not to touch the createContentID (high risk to break
things). I think it solves your problem, what do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]