Coder's Revolution

Do you want a revolution?

CFHTTP doesn't resolve URL's properly on redirect

ColdFusion
So I was working with CFHTTP the other day and noticed a strange behavior. There are two attributes I want to focus on: resolveurl and redirect. When setting redirect equal to true, ColdFusion will follow up to four 30x redirects (if a location header is provided) the most common being 302 (moved temporarily) and 301 (moved permanently). Redirects actually happen more often than you probably think. Did you know every time you type in a URL like "www.server.com/folder" your browser has to make two requests to get the page. There might be a file called "folder", but if there isn't, a 302 comes back and says check out "www.server.com/folder/" (with the trailing slash). A very common example of the 301 redirect is when you type in "yahoo.com". The server comes back and says try "www.yahoo.com".
Comments are currently closed

I'm entering the Blogosphere

ColdFusion, General
Well I've put off doing this for a very long time, but now I've officially entered the blogosphere.
Comments are currently closed