After upgrading Mule Runtime from 4.10.5 to 4.11.x, an API that retrieves a binary response (e.g., a PDF document) and passes it to Salesforce stops working correctly:
- The Mule application returns HTTP 200.
- The downstream service returns the correct Content-Type: application/pdf header.
- Mule application logs confirm Content-Type: application/pdf is present.
- Direct testing of the Mule System API returns Content-Type: application/pdf.
- However, Salesforce receives a null Content-Type, causing the PDF attachment logic to fail silently (the file is not attached to the Salesforce record).
The behavior is 100% reproducible by switching runtime versions while keeping the same application artifact unchanged.
---
Starting with Mule Runtime 4.11.0, the default HTTP transport implementation changed from the legacy Grizzly framework to a new Netty-based HTTP service. This architectural change introduced regressions in how certain HTTP response headers — including Content-Type — are propagated back to calling systems in some scenarios.
The transport-layer shift from Grizzly to Netty is the root cause. Grizzly uses a blocking, pipe-based I/O model with up-front buffering, while Netty uses a non-blocking, event-driven reactive streaming model. This difference in I/O handling can result in headers being stripped or not forwarded correctly in specific response flows on 4.11.x runtimes.
Force the Mule Runtime to use the legacy Grizzly HTTP transport by setting the following JVM system property at the application deployment level:
-Dmule.http.service.implementation=GRIZZLY
How to apply this property:
- CloudHub 1.0: Add the property under Application Properties -> JVM Arguments in the CloudHub deployment settings.
- CloudHub 2.0 / RTF: Add the property in the deployment descriptor under JVM args / system properties.
- On-Premises / Hybrid: Add the property in wrapper.conf or as part of the application startup JVM arguments.
Steps:
1. Add the property -Dmule.http.service.implementation=GRIZZLY to your deployment configuration.
2. Redeploy the application.
3. Verify that the downstream caller (e.g., Salesforce) now receives Content-Type: application/pdf correctly.
4. Confirm the PDF is attached successfully to the target Salesforce record.
▐ Recommended: Validate this workaround in a lower/non-production environment before applying to production.
---
References:
- Mule Runtime 4.11.0 Release Notes — HTTP Service Implementation: https://docs.mulesoft.com/release-notes/mule-runtime/mule-4.11.0-release-notes#patch-4-11-0
---
005460849

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.