gnodet opened a new pull request, #2958:
URL: https://github.com/apache/cxf/pull/2958

   ## Summary
   - XSLT interceptors (`XSLTInInterceptor`, `XSLTOutInterceptor`) and 
`TransformInInterceptor` were hardcoded to use UTF-8, ignoring the charset 
specified in message headers (`Message.ENCODING`)
   - `TransformOutInterceptor` was already fixed in CXF-8234 — this PR fixes 
the remaining interceptors
   - Adds `getEncoding()` helper to `AbstractXSLTInterceptor` that checks 
`Message.ENCODING` on the message and its exchange's inbound message, 
defaulting to UTF-8
   - Adds encoding-aware overloads to `XSLTUtils.transform()` and 
`TransformUtils.createNewReaderIfNeeded()` / `createTransformReaderIfNeeded()`
   
   ## Changes
   - `AbstractXSLTInterceptor`: add `getEncoding(Message)` method
   - `XSLTUtils`: add `transform(Templates, InputStream, String encoding)` 
overload
   - `XSLTInInterceptor`: pass encoding to `XSLTUtils.transform()` and 
`StaxUtils.createXMLStreamReader()`
   - `XSLTOutInterceptor`: pass encoding through 
`XSLTCachedOutputStreamCallback`
   - `TransformInInterceptor`: add `getEncoding()`, pass encoding to 
`TransformUtils.createTransformReaderIfNeeded()`
   - `TransformUtils`: add encoding-aware `createNewReaderIfNeeded()` and 
`createTransformReaderIfNeeded()` overloads
   
   ## Test plan
   - [x] Added `inStreamWithEncodingTest` — verifies XSLT transformation of 
ISO-8859-1 encoded input stream
   - [x] Added `outStreamWithEncodingTest` — verifies XSLT transformation of 
ISO-8859-1 encoded output stream
   - [x] All 8 XSLT interceptor tests pass
   - [x] All 57 transform tests pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to