The remote Debian host is missing a security-related update.
Aniket Nandkishor Kulkarni discovered that in tomcat8, a servlet and JSP engine, static error pages used the original request's HTTP method to serve content, instead of systematically using the GET method. This could under certain conditions result in undesirable results, including the replacement or removal of the custom error page.
Upgrade the tomcat8 packages. For the oldstable distribution (jessie), this problem has been fixed in version 8.0.14-1+deb8u10. For the stable distribution (stretch), this problem has been fixed in version 8.5.14-1+deb9u1.