It means: /^https?:\/\//
Which means a match for any string that starts with either:
'https://' or 'http://', the %r!! syntax is one of many ways to define
a regular expression.
This, however is only to make sure that URIs that start with one of
these are not modified but directly passed to raw_redirect.
So if you do a:
redirect('https://localhost:7000/foo') it will redirect using https.
That's a bit awkward of course but i just wanted to point out that
this code in itself doesn't do any kind of detection of which protocol
you are using.
That would be done by asking Request#scheme
So, in order to have redirects working with https we have to change
following line:
http://github.com/manveru/ramaze/tree/master/lib/ramaze/helper/redirect.rb#L50
The way would be to ask Current.request.scheme about the prefix we
need and replace the static 'http' with that.
I would appreciate your help on this, as i don't have an https setup right now.
^ manveru
Thanks a lot for your effort, contributing a patch may be done this way:
git clone git://github.com/manveru/ramaze
cd ramaze # do your modifications
git add -p # choose what to submit
git commit # enter a title
git format-patch
for patch in *.patch; do
curl -F "text=<$patch;type=text/plain" -F "syntax=diff"
http://p.ramaze.net/save
done
And send us a mail with the URLs of the patches... or use 'git
send-email' to m.fel...@gmail.com
you may also use the procedure from github...
^ manveru