403 on images from Dispatcher | Community
Skip to main content
October 16, 2015
Solved

403 on images from Dispatcher

  • October 16, 2015
  • 4 replies
  • 1133 views

We're experiencing an odd issue with our Dispatchers and some of the images in our content tree. In some cases, requests for images are returning a 403 status. The really odd thing is that this only seems to happen after the Dispatcher has actually cached the image. If the Dispatcher cache is empty and an image is requested it will be requested from the pub, delivered to the requester, and cached. All subsequent requests result in a 403 response. 

I saw this post that mentions the (https://dev.day.com/docs/en/cq/5-4/deploying/dispatcher.html) Dispatcher returning 403's, but the article says that issue is only on Apache 1.3 and we're running Apache 2.2

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

We found out what the issue was. The image URLs contained "jcr:content". The CQ link checker rewrites / mangles this to "_jcr_content". That wasn't happening in our case because the URL was being stuck in a data attribute and pulled in via AJAX. On a Linux server this wouldn't matter. However, ':' is an invalid filename character in Windows, so the cached image was never being created. The request worked if the cache was empty because the request simply got forwarded to CQ which has no problem with ':'s. On subsequent requests, though, the Dispatcher would note the URL should be cached and attempt to retrieve it. The retrieval then failed and a 403 response was sent. 

So the solution is to avoid ':'s in URLs. Or, even better, avoid Windows servers. 

4 replies

Accepted solution
October 16, 2015

We found out what the issue was. The image URLs contained "jcr:content". The CQ link checker rewrites / mangles this to "_jcr_content". That wasn't happening in our case because the URL was being stuck in a data attribute and pulled in via AJAX. On a Linux server this wouldn't matter. However, ':' is an invalid filename character in Windows, so the cached image was never being created. The request worked if the cache was empty because the request simply got forwarded to CQ which has no problem with ':'s. On subsequent requests, though, the Dispatcher would note the URL should be cached and attempt to retrieve it. The retrieval then failed and a 403 response was sent. 

So the solution is to avoid ':'s in URLs. Or, even better, avoid Windows servers. 

Level 6
October 16, 2015

Hi ,

Can you paste here your dispatcher error log for furthur drill down?

Scott_Brodersen
Level 8
October 16, 2015

Thanks for following up with the solution

Scott_Brodersen
Level 8
October 16, 2015

Can you post your dispatcher.any file?

scott