Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Cara Beverage and Taraneh Kossari
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Cara Beverage@caraphernalia ) and Taraneh Kossari

CFHttpSession.cfc Fixed And Added To Projects

By Ben Nadel on
Tags: ColdFusion

A while back, I created CFHttpSession.cfc, a ColdFusion component that wraps around ColdFusion's CFHttp tag to maintain a session across multiple CFHttp requests. It does this by capturing returned cookie information from each response and sending it back with the subsequent CFHttp requests. As part of that blackbox, the CFHttpSession.cfc also handled sessions when the response headers requested a relocation. As Toby Reiter pointed out, however, my relocation was breaking if the response headers contained an absolute-relative link - one that starts with a slash. Example:

/sub-folder/index.cfm

I had only been expecting relative locations (ex. ../../index.cfm) and absolute locations (ex. http://....). Now, I have added code that checks for the third type of location - the absolute-relative (ex. /sub-folder/index.cfm).

This new code can be downloaded from my new CFHttpSession.cfc Project page.

Tweet This Great article by @BenNadel - CFHttpSession.cfc Fixed And Added To Projects Thanks my man — you rock the party that rocks the body!



Reader Comments