Friday, 19 April 2013

Decoding an URL using O2 Platform C# REPL

Sometimes the O2 Platform helps me in the smallest of ways.

After my windows VM was forcible rebooted by Windows Update, I was facing with a pain to recover chrome’s open windows due to:
  • When I opened Chrome I was not logged in to Starbucks
  • Starbucks redirects to their login, while keeping the previous address in as URL encoded GET parameter
  • The redirect doesn’t work if you are already logged in
Here is a screenshot of what this looks like: image

The solution was to remove the BtOpenZone bit and manually fix the CPURL value ...

... or to copy it to an C# REPL and just use the .urlDecode() extension method do this:


And since Chrome is my current default browser, I can even do:


to automatically open that decoded page :)