Possible SES interceptor bug...

I had an issue with a route and don’t know if this is a bug or what the repercussions are of my fix.

I have a simple route

addRoute(pattern=“page/:slug?”,handler=“courseRender”,action=“dspPage”);

which works fine until I have a url such as this

http://someurl.local/somesite/index.cfm/page/somesitepage

where the site name appears in the page slug.

I found the line that breaks it in the SES interceptor. In the getCleanedPaths function, this bit of code.

if( len(items[“scriptName”]) ){

items[“pathInfo”] = replaceNocase(items[“pathInfo”],items[“scriptName”],’’);

}

Changes the above pathinfo from page/somesitepage to pagepage.

I am unsure of the purpose of that bit of code. Can someone point me in the right direction. If I comment out that line, it and all my other routes seem to work fine.

Curt Gratz

Hmm, I have no idea why I did that, do I have any comments on it? Seems weird? Maybe I did it to cleanup something. Not sure anymore

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Only comment is this close to it is this // Clean up the path_info from index.cfm and nested pathing I believe that is for the line right after it that reads

items[“pathInfo”] = trim(reReplacenocase(items[“pathInfo”],"[/\]index.cfm",""));

Then the next set of code is the one that has the issue which is this.

if( len(items[“scriptName”]) ){

items[“pathInfo”] = replaceNocase(items[“pathInfo”],items[“scriptName”],’’);

}

Thanks,

Curt

Man, I really don’t remember the purpose

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Ha, well, I couldn’t think of one either. See any possible issues of removing that bit?

Curt

Not sure to tell you at this point.

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

I had a recent issue with the SES interceptor too. Well, my issue was with using a custom SES interceptor. I fixed it in my github branch. The getSESInterceptor() method was always returning just “SES”, even if you had a custom interceptor with a different name.

Actually I revised this and you can use q custom one as long as it is named SES.

Ahh, ok. I had considered doing that as a quick fix, but felt like poking around.

Guys, I don’t quite remember why that was done, maybe we can check the log history and find when that changed!

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano