AEM always returns 200 status code. | Community
Skip to main content
janellic4
Level 2
Aug 29, 2019 8:10 PM UTC
Solved

AEM always returns 200 status code.

Upon requesting non-existent pages, both aem author and publish instances return blank page with 200 status code. The default 404 error page is not showing.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
leoberliantAccepted solution
Employee
Sep 3, 2019 2:22 PM UTC

Do you have any custom filters that can possibly massage the response? You might want to stop your custom bundles in OSGi and use /system/console/requests to track recent requests.

34 replies

Employee
Sep 3, 2019 8:11 PM UTC

You might need to add configuration properties, as such you can define only those URLs that required a specific status.

Translate
janellic4
janellic4Author
Level 2
Sep 3, 2019 2:37 PM UTC

Hi berliant,

Thank you for your reply. I have one custom filter that sets status code to 400 if the slinghttprequest does not satisfy certain condition. After I stopped the custom bundle, the 404 not found status code shows up correctly. However, this custom bundle is also needed in the project, is there any way to solve the issue instead of stopping the custom bundle?

Translate
leoberliantAccepted solution
Employee
Sep 3, 2019 2:22 PM UTC

Do you have any custom filters that can possibly massage the response? You might want to stop your custom bundles in OSGi and use /system/console/requests to track recent requests.

Translate
janellic4
janellic4Author
Level 2
Sep 3, 2019 1:47 PM UTC

Hi himanshusinghal,

I just tried to increase the size to different sizes. No matter how many size I increased, I still got the 200 status code and the blank page.

Translate
Himanshu_Singhal
New Participant
Sep 3, 2019 9:17 AM UTC

Could you please try increasing the buffer size to lets say 10000 and try again?

Translate
janellic4
janellic4Author
Level 2
Sep 3, 2019 2:08 AM UTC

Hi himanshusinghal,

Yes, I still got the 200 status code even after I doubled the response buffer size.

Translate
Himanshu_Singhal
New Participant
Sep 1, 2019 8:19 AM UTC

Hi janellic4,

While saving the configuration, it displays the error but it saves the updated value. Try opening the value again and it should show updated "Response Buffer Size".
Even after increasing the response buffer size, do you still get the 200 status code?

Do you get any error as well in logs?

Translate
janellic4
janellic4Author
Level 2
Aug 30, 2019 2:16 PM UTC

Hello cal-netsolutions,

Thank you for your suggestion. However, we have implemented a custom error handler. It works fine in Publish instance in another computer. It does not work in some computers and the stage. They have the same problem: invalid url always got 200 status code with blank page.

Translate
janellic4
janellic4Author
Level 2
Aug 30, 2019 2:10 PM UTC

Hi himanshusinghal,

Thank you for your response. I tried to increase the Response Buffer Size, then click Save. I got a request error as following:

Translate
janellic4
janellic4Author
Level 2
Aug 30, 2019 1:53 PM UTC

Hi, Umeshsondhi

Thank you for your reply. I have read the article you mentioned.  In localhost, I do not use a dispatcher. It seems that a blank page would always be returned by Publish for invalid url request. I don't know how this blank page is created.

Translate