I just wanted to drop in here and say that I ran into a similar issue. Using CommandBox to spin up a Lucee server with no additional configuration. I was testing the use of CFHTTP
with redirects:
<cfscript>
methods = [ "GET", "POST", "PUT", "PATCH", "DELETE" ];
results = methods.map(
( method ) => {
http
result = "local.httpResponse"
method = method
url = "http://127.0.0.1:58662/07-fetch-status/api.cfm"
redirect = "yes"
;
return httpResponse.fileContent;
}
);
dump( results );
</cfscript>
For any non-GET
request, the HTTP response fileContent
just comes back with Document Moved
and does not follow the redirect.
Like I said, it’s just a CommandBox server with no special config. Only dropping this note here to commiserate with anyone else that runs into this issue. I didn’t get it solved.