Odd. This should work if I understand urlparse correctly.