Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Last-Modified header is not being added in page response from dispatcher.

Avatar

Community Advisor

Dear Members,

I was analysing the network call for a page, one very unique kind of issue I observed that is :

Not able to see the last-modified header for page content, for other type like dam, clientlibs fonts an all I can can the header in the same network call.

First I thought this my be the reason that publisher is not sending the header but when I see the *.html.h file, the last-modified header was present in the dispatcher cached file. sam as other types like dam n all.

I explicitly try to send the same response header thru. a custom filter but again no luck.

Try to see the behaviour after commenting all the Rewrite rules but agin no luck.

Note: there is no Header unset for those two headers either direct or conditional.

Same thing is working in my local dispatcher and apache .

Please suggest if anyone is having some thought about the root cause.

 

Thanks

Umesh Thakur

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 7

HI @Umesh_Thakur ,

have you the possibility to perform a curl into the dispatcher server?

You should try to execute from the dispatcher server the following curl:

curl --head http://serverip/page-of-aem

and check if head appears into this list.

 

Based on the result we can be sure if the issue happens cause of a dispatcher configuration issue or not.

 

Let us know.

Thanks,

Antonio

View solution in original post

11 Replies

Avatar

Level 7

Hi Umesh,

are you sure that there's no CDN (like Akamai) on top of your dispatcher?

Cause it could happens that Akamai it's configured only for dispatch some specific header (without last-modified).

 

Let us know,

Thanks,

Antonio

Avatar

Community Advisor

Thanks for your response Antonio.

This is only for dispatcher there is no CDN involved.

 

--Umesh Thakur

Avatar

Correct answer by
Level 7

HI @Umesh_Thakur ,

have you the possibility to perform a curl into the dispatcher server?

You should try to execute from the dispatcher server the following curl:

curl --head http://serverip/page-of-aem

and check if head appears into this list.

 

Based on the result we can be sure if the issue happens cause of a dispatcher configuration issue or not.

 

Let us know.

Thanks,

Antonio

Avatar

Employee Advisor

Hi @Umesh_Thakur ,

 

Are there any headers listed under /cache /headers in the dispatcher ?

/cache
     -/headers


Thanks.

Avatar

Community Advisor

Yes Milind, we have allowed caching for those headers and being cached as well but not appending as part of the response header. 

 

Thanks for the response.

Umesh Thakur

 

Avatar

Community Advisor

Thanks for the response @Jörg_Hoh ,

It is already enabled and Last-Modified header is being cached as well but not appending in the response.

I can see the header in as response header in other content type like dam assets, css n all but not able to see only for page content.

We don’t have any rule written to unset the header for page content .

Please guide

Thanks

Umesh Thakur

Avatar

Employee Advisor

So to recap:

* In the dispatcher cache there is a page.html.h file present, containing the relevant header informatino.

* but when you request this page.html via curl from the dispatcher, these headers are not part of the response.

 

In this case I would recommend to set the loglevel to 3 to get the maximum amount of logging and then redo the request. 

Avatar

Community Advisor

Yes, you are right @Jörg_Hoh,

not even in browser response header I can see the last-modified header for page content.

I tried with loglevel 3 as well not much info. Please see the below images for curl and its generated log:

curl:

curl copy.jpeg 

log:

log.jpg

Thank you very much

Umesh Thakur

Avatar

Employee Advisor

Can you check with a full GET? Not sure if HEAD requests have the full set of response headers. Can you also check if there's a difference when you request from your development machine and from localhost (that means being logged on the same machine where the dispatcher runs and doing the same request via localhost)?

Avatar

Level 1

@Umesh_Thakur @Jörg_Hoh 

hi, i have the same issue, the Last-Modifed header is saved in test.html.h but it's not added to the request's response to the page. did you resolve this issue on you end?