CFLocation and Safari

I had a weird issue today , and I thought I’d share.

I was having trouble reproducing an issue that a client was reporting in the flow of a page that was posting back to itself. No matter what I did I couldn’t get it to occur on my machine.

I then went over a dump of the cgi scope and noticed they were using Safari. I gave it a try, and BOOM, same problem.

I looked at what was happened, and it looked like the querystring of the last request was added to the querystring of where I was trying to cflocate.

So I was posting to “?method=delete_process&id=1” and cflocating to “?method=list” when I was done. Firefox tried to cflocate to “?method=list” but Safari posted to “?method=delete_process&id=1?method=list”. This caused the error, as id=1 was already deleted, and even if it wasn’t id=1? was invalid.

The fix was to prepend “#cgi.script_name#” before the question mark.

After a quick search, it turns out that this has come up in Forum over on Ray’s site (cflocation & safari).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s