efegokdemir opened a new pull request, #4360: URL: https://github.com/apache/logging-log4j2/pull/4360
## Summary An evaluated HTTP appender header can contain a line break from runtime context data. `HttpURLConnection` rejects that value with `IllegalArgumentException`, which previously aborted the append and dropped the complete log event. This change skips only the invalid header, logs a warning, and continues sending the event. ## Changes - Handle invalid evaluated header values per header instead of aborting the request. - Add a WireMock regression covering a runtime header containing a line break and verifying the event is still delivered. ## Testing - `JAVA_HOME=/opt/homebrew/Cellar/openjdk@17/17.0.20.1/libexec/openjdk.jdk/Contents/Home PATH="$JAVA_HOME/bin:$PATH" mvn -pl log4j-core-test -am test-compile org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test@default-test -Dtest=HttpAppenderTest -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.check.skip=true -Dspotless.apply.skip=true` — passed (8 tests) - `JAVA_HOME=/opt/homebrew/Cellar/openjdk@17/17.0.20.1/libexec/openjdk.jdk/Contents/Home PATH="$JAVA_HOME/bin:$PATH" mvn -pl log4j-core-test,log4j-core -am spotless:check` — passed - `git diff --check` — passed AI assistance was used during implementation; the submitted change and validation were reviewed for this contribution. Fixes #4352 -- 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]
