Image loading fails due to multiple Content-Disposition headers in AEMaaCS

In Adobe Experience Manager as a Cloud Service (AEMaaCS), JPEG images fail to load when responses contain multiple Content-Disposition headers. The issue occurs because affected image responses contain two Content-Disposition headers, while working responses contain only one. To resolve the issue, configure a single content-disposition header.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS), production and stage environments.

Issue/Symptoms

  • Some JPEG images fail to load in browsers such as Chrome, displaying errors like ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION.

  • In Chrome DevTools, failed requests show missing or invalid response headers.

  • In Safari, images may be missing for all users.

  • The issue can be intermittent, affecting some users or browsers but not others.

  • Affected image responses contain two content-disposition headers (for example, both inline and attachment), while working responses contain only one.

  • Example of a failing response:

    code language-none
    HTTP
    HTTP/1.1 200 OK
    content-type: image/jpeg
    content-disposition: inline
    content-disposition: attachment
    x-cache: HIT
    Age: 760
    ETag: "3445-610b720f12c80"
    Last-Modified: Tue, 06 Feb 2024 14:09:38 GMT
    
  • Example of a correct response:

    code language-none
    HTTP
    HTTP/1.1 200 OK
    content-type: image/jpeg
    content-disposition: inline
    x-cache: HIT
    Age: 921
    ETag: "0x8DE77BA2921C01B"
    Last-Modified: Sun, 01 Mar 2026 17:44:17 GMT
    

Root cause

This issue occurs when the Dispatcher configuration adds a new content-disposition header without removing an existing one from the origin response. As a result, multiple content-disposition headers appear in the response, which browsers like Chrome reject, causing images to fail to load.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review your Dispatcher configuration, especially the rules that set the Content-Disposition header for image and PDF assets.

  2. Update the Dispatcher configuration to remove any existing Content-Disposition header before setting a new one. For example, use the following configuration:

    code language-none
    Header unset Content-Disposition
    Header always set Content-Disposition "inline"
    
  3. Apply the same change to rules for PDFs or other file types as needed.

  4. Deploy the updated configuration using the web-tier config pipeline. Note that standard CI/CD pipelines may not pick up web-tier configuration changes.

  5. Purge the Dispatcher and CDN caches for the affected asset paths to ensure that the updated headers are served.

  6. Fetch the affected assets and inspect the response headers to confirm that only one Content-Disposition header is returned. For example, use curl -D - <asset-url>.

  7. Verify that the response contains a single Content-Disposition: inline header.

  8. Verify in browsers such as Chrome and Safari that images load correctly.

recommendation-more-help
experience-cloud-kcs-help-kbarticles