Further cleanup and simplification of redirect code.

This commit is contained in:
Uriel 2009-03-03 13:15:46 +00:00
parent e74f2966ca
commit d12c13ee25
3 changed files with 15 additions and 15 deletions

View file

@ -6,7 +6,7 @@ fn dprintv { { for(v in $*) { echo -n $v^'#'^$#$v^'=' $$v '; ' }; echo } >[1=2]
fn escape_html { sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' $* }
fn http_redirect {
if(~ $1 http:* https:*)
if(~ $1 http://* https://*)
t=$1
if not if(~ $1 /*)
t=$"base_url^$1