ashrafiucse commented on PR #6757: URL: https://github.com/apache/jmeter/pull/6757#issuecomment-5822736709
All points are addressed in d68608fc57: - **Platform-independent UTF-8**: `SendMailCommand` no longer calls `setFileName`; it now sets the `filename` parameter of `Content-Disposition` and the `name` parameter of `Content-Type` via `ParameterList.set(name, value, "UTF-8")`, independent of `MimeUtility.getDefaultMIMECharset()`. Verified on Java 17 with `-Dfile.encoding=Cp1252`: the old path yields `filename*=Cp1252''%3F%3F%3F%3F%3F.txt`, the new one `filename*=UTF-8''%D1%82…` in both headers, under both charsets. - **jakarta.mail 1.6.8** (your suggestion, as 1.6.2 is the last release under the old coordinates): same `javax.mail` namespace. It needed a `com.sun.activation:jakarta.activation` exclude, a Renovate pin to `< 2.0.0`, the signing key `485E371CB07EABE6D5778D4B0C27E8FAC93B3B19` (Eclipse Project for JavaMail) in the keyring and metadata, and an updated license override — 1.6.8's parent POM declares EPL-2.0 / EDL-1.0 / GPL2 w/ CPE instead of CDDL + GPLv2+CE. - **`expected_release_jars.csv`** regenerated via `-PupdateExpectedJars`; `verifyReleaseDependencies` passes. - **Tests**: both headers asserted; long names covered (ASCII > 60 chars → `filename*0=`/`name*0=` continuations; long non-ASCII → single `filename*=`, since `encodeValue` never splits encoded values); every case re-parses the message and compares the decoded `getFileName()` with the original; `byte[]` helper without the no-op close; method names without the `test` prefix. Green under `file.encoding=UTF-8` and `-Dfile.encoding=windows-1252`. - **Changelog**: version bump + jar rename / new Maven coordinates / canonical host name in `Message-ID` under Non-functional changes; SMTP fix moved to an "Other samplers" section with `<pr>` and contributor credit; duplicate entry removed. - **Description**: states the root cause (`mail.mime.encodeparameters` defaulted to `true` in JavaMail 1.5, the 2013 beta predates it) and lists the observable changes — including `mail.mime.splitlongparameters` continuations and the dual-jar risk on unpack-over upgrades — instead of claiming a plain non-breaking fix. One side effect worth flagging: text attachments no longer get an automatic `charset=us-ascii`, because the `Content-Type` is now set together with the encoded `name` parameter before `saveChanges()`, so `updateHeaders()` no longer rewrites it. The resulting headers are pinned by the tests. -- 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]
