cfhttp call within REST service returning 301 Moved Permanently
In building out a new server for ColdFusion 2021, I migrated code running on CF2016 which is returning a strange error. One of my GET REST services which calls another using cfhttp is returning the following:
{
Message: "JSON parsing failure at character 1:'<' in <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://myservername.ddns.net/rest/services/grantPermission">here</a>.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at myservername.ddns.net Port 80</address>
</body></html>"
}
What makes this even stranger is the fact that there is no redirect in either service.
See the below snippet of error from the exception log:
"Error","ajp-nio-127.0.0.1-8020-exec-2","04/21/23","18:57:09","","HTTP 500 Internal Server Error"
coldfusion.rest.method.dispatch.CFRestException: HTTP 500 Internal Server Error
Flowed by:
Caused by: coldfusion.xml.rpc.CFCInvocationException: [coldfusion.runtime.JSONUtils$JSONParseException : JSON parsing failure at character 1:'<' in <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://myservername.ddns.net/rest/services/grantPermission">here</a>.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at myservername.ddns.net Port 80</address>
</body></html>. ]
Has anyone encountered this issue before?
