Loading
The Trailblazer Community is now read-only Read More

Content-Type Header Returns Null to Salesforce After Upgrading to Mule Runtime 4.11.x — Workaround Using Grizzly HTTP Transport

Publish Date: Oct 5, 2026
Description

Symptom

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.

---

Root Cause

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.

 

 

Resolution

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.

 

Additional Resources

---

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

---

Knowledge Article Number

005460849

 
Loading
Salesforce Help | Article