Hey everyone..... Does anyone have any thoughts on...
# cfml-general
g
Hey everyone..... Does anyone have any thoughts on why a url called with cfhttp (with headers / body defined) Will return a 403 Forbidden status ( I have made sure that the nginx and tomcat users are in each other's groups. I have made a separate group "www-data" and added both nginx and tomcat users to it. The entire application has tomcat:www-data for owner:group assignment And to rule it out - I even tested after changing the entire application file-tree to "777" permissions. None of these changes affected the result ) But the same url / headers used via curl - works, returning a 200 OK? And, while I am using Lucee, NGINX and Tomcat 9 - I don't know that it is a Lucee specific issue - so I posted here to open it up a little to everyone. (I THINK - the question I am really asking is - is there a difference in behaviour / semantics between cfhttp and curl - because that might lead to a solution? ) As always - Thanks for any thoughts you might have.
s
Just to make sure your request options are the same can you try https://curlconverter.com/coldfusion/
g
Thanks Scott - awesome tool.
Though it didn't help me any. A cfhttp call - calls another url via cfhttp and the second fails. Works with Lucee 5.3.10.97 And the following is seen when running
/usr/share/tomcat8/bin/version.sh
Copy code
Using CATALINA_BASE:   /usr/share/tomcat8
Using CATALINA_HOME:   /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/8.5.39 (Ubuntu)
Server built:   Sep 9 2019 19:47:51 UTC
Server number:  8.5.39.0
OS Name:        Linux
OS Version:     5.4.0-1103-aws
Architecture:   amd64
JVM Version:    11.0.19+7-post-Ubuntu-0ubuntu118.04.1
JVM Vendor:     Ubuntu
However, the exact same code - does not work on anything remotely recent WRT to Lucee versions - running tomcat 9 Lucee 5.4.4.38 And here are the details of tomcat;
Copy code
Using CATALINA_BASE:   /usr/share/tomcat/current
Using CATALINA_HOME:   /usr/share/tomcat/current
Using CATALINA_TMPDIR: /usr/share/tomcat/current/temp
Using JRE_HOME:        /
Using CLASSPATH:       /usr/share/tomcat/current/bin/bootstrap.jar:/usr/share/tomcat/current/bin/tomcat-juli.jar
Using CATALINA_OPTS:
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.82
Server built:   Oct 11 2023 13:15:08 UTC
Server number:  9.0.82.0
OS Name:        Linux
OS Version:     5.10.199-190.747.amzn2.x86_64
Architecture:   amd64
JVM Version:    11.0.20+8-LTS
JVM Vendor:     Red Hat, Inc.
The nginx versions and (all nginx) configs are the same The tomcat web and server XMLs are the same. The lucee-proxy / lucee-global confs are the same, too. (Not sure if those^^^^ are ours or were part of a Lucee install?) Regardless - it did work and doesn't now. We have gotten around it - by ditching the http call and calling the CFC directly - but it bothers me that I don't have an answer.