Ensure a REST redirection is not relative


I've got a problem with a RESTful redirect causing Nokia series 40
phones to go in to spasms. When a user logs in to our service (using
restful_authentication), they are redirected to their homepage via a
redirect_to homes_url call. The problem is that, for some reason, in
this context, homes_url generates '/homes' and not 'http://server/
homes' . Now Nokia decrees that relative redirects are a sin of the
second highest order and immediately warns the user that they are
'about to send data to another server'.

Now, I know I can just pass the absolute URL to the redirect_to, but
this breaks the otherwise DRY nature of the code so far as I will need
to manually account for the boxes in the cluster for this one link.

My question, then, is: is there anyway to force homes_url (or any
RESTFUL route) to return an absolute URL? Strangely, it does seem
that the same call generates absolute URLs when used with other
methods, such as link_to.


Nevermind, after doing a bit more research, I'm pretty sure the cause
of this is phone and not rails.

Sorry if this next bit is a bit off-topic, just hoping to help anyone
else who might be tearing hair out over this:

It seems that the stock browser in series 40 phones:

a) Maintains the method of the call on redirect. So, if you redirect
from a controller which you have POSTed to, then the phone POSTs the
redirect (joy);

b) Strips protocol and server from redirects, so they all become

Also, the complaint about sending data to another server only occurs
with POSTs (This makes a sense in a twisted way).

I've not yet found a sensible work around, but I guess I'll be
submitting my forms via GET for these stupid phones in the future.
Does Microsoft own Nokia?

This isn't really the right place to ask if anyone has any better
ideas, but drop me an email if you've any suggestions.