Shaun Mccran

My digital playground

07
S
E
P
2010

Forcing an SSL redirect using Coldfusion

I've never really coded much around individual Secure templates, but this afternoon I found myself working in a framework where certain templates were required to be called with the 'https' URL instead of standard non secure URLs.

This turns out to be incredibly easy. There is a variable in the cgi scope that tells you if the request is served under a secure port or not, cgi.server_port_secure returns true or false (1/0), so you can use it to redirect people to where they should be.

view plain print about
1<cfif NOT cgi.server_port_secure>
2
3    <cflocation url="https://#cgi.server_name##cgi.script_name#"
4    addtoken="false">

5
6</cfif>

I've used other cgi values above as I've put this in a 'prefuseaction' function in a fusebox CFC controller file. That way all requests to any actions in that file are routed to the SSL equivalent.

04
S
E
P
2010

Twitters OAuth changes break HTC Peeps login

I've got a HTC Desire Android handset and I use the Twitter Application that ships with it, Peep. Recently it stopped logging in for me, after a quick search around online it looks like Twitter have finally made their OAuth login authentication mandatory for third party applications.

This is a good thing in itself, but it does raise the question of when a platform changes from being just 'open' to being so wide spread that it is considered as a public API. I'm not in a position to comment on why Peep wasn't updated to work with OAuth before it was released, but it does make you question who is responsible for maintaining the service levels of public API's.

If Twitter have published and promoted their API, surely it is their best interests to maintain its functionality, and ensure some level of backwards compatibility? This is a tricky point to argue, as on one hand it is very good that they are maturing their platform with new features and security, but on the other hand they do risk alienating the community they rely on by introducing new features that require third party application changes. By this I mean changes that require an update, and are not backwards compatible, rather than just not updating and missing out on any new functionality.

This is especially prominent in this instance as it affects the Twitter Application that actually ships with HTC Android handsets, so it is guaranteed to be quite widespread.

25
A
U
G
2010

Flash Papervision error loading resource because of Mime type

I've been working on a flash project for a UK charity for the last few days, and one of the more random issues that the flash files have thrown up is being unable to load Papervision 3D resource files.

If your flash applications have issues loading .dae files, or you are seeing "HTTP Error 404 - File or directory not found" error messages then this blog entry is for you.

[ More ]

20
A
U
G
2010

Guide to getting SCUMMVM working on Android 2.0 and higher devices

I didn't even know that there was a SCUMM (Lucas Arts game engine from the early 90's) emulator for the Android platform until I read a blog post by Justin Carter (http://www.madfellas.com/ where he mentioned he was playing with it.

It takes a little bit of tweaking to get running on Android 2.0 and up devices, and all the useful files aren't in the Android marketplace, so here is my short guide, with links to getting SCUMMVM running on your Android handset.

[ More ]

_UNKNOWNTRANSLATION_ /