content-length is missing in html response header in dispatcher. | Community
Skip to main content
onkarh71407069
Level 2
September 21, 2020
Solved

content-length is missing in html response header in dispatcher.

  • September 21, 2020
  • 1 reply
  • 2151 views

Hi,

content-length has not appeared on HTML header response.
I have added "content-length" in /clientheaders in dispatcher.any file as per documentation.
Still, this does not appear in the header response for HTML.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nupur_Jain

Hi @onkarh71407069 

 

/clientheaders is not for adding headers to response but to allow headers to pass to publisher iinstance from request. 

Could you check if you have enabled caching html headers on dispatcher. If a request is being served from dispatcher and headers are not being cached, the response headers will miss the actual response headers. 

To enable header caching, add /headers section to /cache section like

/cache {
  ...
  /headers {
    "Cache-Control"
    "Content-Disposition"
    "Content-Type"
    "Expires"
    "Last-Modified"
    "X-Content-Type-Options"
    "Last-Modified"
"content-length" } }

 

Make sure your content-length header is part of the list. Also, remove cached pages after you make changes and restart apache servers.

 

You can read more about this dispatcher configuration from https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html#caching-http-response-headers.

 

Hope it helps!

Thanks!

Nupur 

1 reply

Nupur_Jain
Adobe Employee
Nupur_JainAdobe EmployeeAccepted solution
Adobe Employee
September 21, 2020

Hi @onkarh71407069 

 

/clientheaders is not for adding headers to response but to allow headers to pass to publisher iinstance from request. 

Could you check if you have enabled caching html headers on dispatcher. If a request is being served from dispatcher and headers are not being cached, the response headers will miss the actual response headers. 

To enable header caching, add /headers section to /cache section like

/cache {
  ...
  /headers {
    "Cache-Control"
    "Content-Disposition"
    "Content-Type"
    "Expires"
    "Last-Modified"
    "X-Content-Type-Options"
    "Last-Modified"
"content-length" } }

 

Make sure your content-length header is part of the list. Also, remove cached pages after you make changes and restart apache servers.

 

You can read more about this dispatcher configuration from https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html#caching-http-response-headers.

 

Hope it helps!

Thanks!

Nupur