RE: [coldbox:16816] [Coldbox 3.5.2] onError firing twice with http status code set to 500.

Can you confirm the client is not re-issuing the request when it receives a 500?



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Hi Brad,

I didn’t think the client is re-issuing the request (BTW I’m validating this behavior using relaxURL). I wrapped the cfhttp call in the Relaxer.send() method with a writelog statement before and after. I also put a writeLog statement in my preHandler code. I’m getting this result:

“Information”,“web-325”,“12/12/12”,“14:14:27”,“8D670B22015CC2CB7B41941BBDC829C0”,“relax issuing request.”
“Information”,“web-318”,“12/12/12”,“14:14:28”,“8D670B22015CC2CB7B41941BBDC829C0”,“preHandler executed”
“Information”,“web-318”,“12/12/12”,“14:14:28”,“8D670B22015CC2CB7B41941BBDC829C0”,“onError executed”
“Information”,“web-322”,“12/12/12”,“14:14:29”,“8D670B22015CC2CB7B41941BBDC829C0”,“preHandler executed”
“Information”,“web-322”,“12/12/12”,“14:14:29”,“8D670B22015CC2CB7B41941BBDC829C0”,“onError executed”
“Information”,“web-325”,“12/12/12”,“14:14:29”,“8D670B22015CC2CB7B41941BBDC829C0”,“relax ending request.”

However, if I just past my resource URL in the browser I get this in my log file:

“Information”,“web-323”,“12/12/12”,“14:19:33”,“8D670B22015CC2CB7B41941BBDC829C0”,“preHandler executed”
“Information”,“web-323”,“12/12/12”,“14:19:33”,“8D670B22015CC2CB7B41941BBDC829C0”,“onError executed”

I’m thinking the issue might be with the CFHTTP call in the Relaxer CFC.


Following up on this it seems I can isolate this to some behavior with CFHTTP I don’t understand. I set up a stand alone page that made a CFHTTP call to my resource and the received the preHandler and onError message in my log file twice when the return statuscode is 500. If I return a statuscode of 200 I only get the preHandler and onError once in the log files. Anybody else have this problem?


Even more testing results. I totally removed Coldbox from the equation, so the issue isnt’ there. I set up two pages:







And verified that the log file is written to twice. As soon as I change the statusCode to 200, only one entry is created.

So weird.

Just tried a test with the two CFM files on one of our production servers. No double logging when returning a 500 statuscode. Boy this is weird, though I’m inclined to let it go at this point. If I’m feeling strong I will try SeeFusion and let you know how it goes. Thanks for your help, Brad.