The Pipe |

Server version: Apache/2.4.6 (CentOS 7)
lucee-5.2.7.062-pl0-linux-x64

I have an interesting issue that I can’t seem to find anything about. We have a third party URL that we have no control over. Can’t be changed. Example below of the Query String. Apache handles this fine and I can output and process with Apache in a test.htm just fine. When using a page.cfm as the target it blows up with an HTTP error 400. I know it is the pipe character and java. When it is properly formatted as %7C, it works fine. Yes i would like to have the source format things correctly, but Google is a blunt instrument of internet communism. I need to reformat this Q.S. to work with Lucee. Any ideas will be greatly rewarded with Karmic Glory. Priceless right?

?source=google_pla&kwid=BA011&utm_source=google&utm_term=Product_Target&utm_campaign=SHOPPING&utm_medium=cpc&utm_content=Y5o6l0we|pcrid|51465720250|pkw||pmt||pdv|c|

Thanks for the help.

Sorry to seem stupid, Jay, but how is Lucee processing this URL? I’ve tried calling a local .cfm and adding your query string and the page works ok. I’m able to output the utm_content url variable which includes the pipes.

I’ve probably misunderstood what you mean by “using a page.cfm as the target”. If so could you explain?

Thanks for the reply. I can send the previous query string to a blank cfm page and it will error. But a simple htm page it works fine and I and javascript out the QS and alert the variable with the pipes. If i convert the pipes to the %7C manually like in the url below it works fine. So I don’t think it is anything related to apache. It fails on a fresh install of cenos 7, apache and lucee 5. The pipe is the issue as it is a special character in Java… unless I am mistaken Lucee runs on a minimal Java platform. As far as i can tell lucee is not processing the piped QS it is error-ing.

I’ve tried to convert all the pipes to the %7C by using an apache rewrite with no sucess. But that could be that i am doing it wrong. It could entirely be something in my lucee config. But I can not figure out were. It may be something in the proxy pass settings in my httpd.conf, they are default. I don’t know. No matter what server i connect to it fails with the pipes in the QS.

?source=google_pla&kwid=BA011&utm_source=google&utm_term=Product_Target&utm_campaign=SHOPPING&utm_medium=cpc&utm_content=Y5o6l0we%7Cpcrid%7C51465720250%7Cpkw%7C%7Cpmt%7C%7Cpdv%7Cc%7C

So you’re just calling a .cfm page and adding that query string to the URL. As I say, I’m able to do that and have the cfm page output the url parameters in the QS including unescaped pipes without any errors, so I don’t think it can be Lucee/Java specifically.

I’m afraid I can’t tell you what is causing the issue though. As you say it could be in the way Apache is communicating with your servlet container, but I’m not familiar with your platform.

I also cant reproduce your problem.
Here i dump the url-scope:


I also use a apache to proxy to the tomcat-server.

hmm. So then my configuration is in question. I am using Centos 7, Apache, and Lucee 5. From what I understand Apache vs Apache-tomcat, A.T. allows the use of servlets. Reference below. We don’t have servlets or need to process java outside of Lucee/Coldfusion. Do I need to use apache-tomcat regardless?

Tomcat is required for Lucee. If you installed Lucee, you normally got a Tomcat with it. (in default its running on port 8888).
You can(dont have to) install a extra apache and proxy you cfc/cfm files to it.
The advantage is that you can use .htaccess, load-balancing, better performance for static files etc.

Im not sure what you current setup is… You can test the hit the url directly on the tomcat ?

My server is working as expected. All but the pipe issue. I wasn’t sure whether or not tomcat was installed with Lucee.

I’m not all that happy with the solution. I don’t think it was the best option.

I added this to my apache site config. It still kinda screws up the last pipe.

RewriteEngine on
RewriteCond %{QUERY_STRING} ^(.)|(.)$
RewriteRule ^(.*)$ $1?%1|%2 [R=301,L]

result after in a dump.

is this thing on?
Scope
kwid
string BA011
source
string google_pla
utm_campaign
string SHOPPING
utm_content
string Y5o6l0we|pcrid|51465720250|pkw||pmt||pdv|c%7c
utm_medium
string cpc
utm_source
string google
utm_term
string Product_Target