How to catch a parameter that contains a full url

Hi
I need some help!

I have controller that I need to pass a full url (with its own
parametrs) as a parameter, e.g. I want to call my controller with:

/mycontroller/catchurl?url=http://somedomain.com/afile.jsp?param1=xx&param2=yy

and in action "catchurl" in mycontroller.rb I would like to have
params[:url] to be
"http://somedomain.com/afile.jsp?param1=xx&param2=yy"

I guess that one could do something smart with map.connect
but so far I have failed completely.

Is there anyone that can give me some help?

whats the problem? params[:url] should work, do you not want to use it that way ?

The problem is that the url parameter gets split up into several
parameters, i.e.
params[:url] is http://somedomain.com/afile.jsp?param1=xx
and
params[:param2] is yy

What I want is to treat the whole url as one entity, I do not want it
to be slit up into separate parameters.

straightflush@gmail.com wrote:

The problem is that the url given above is not valid - ? and & need to be escaped in
the parameter value. Browsers do this automatically behind the scenes, and then
Rails transforms the parameters back. It seems unclear why you’re having this

problem - url_for automatically handles the encoding, and so do forms.

Hope this helps,