xo::ProtocolHandler instproc initialize (public)
<instance of xo::ProtocolHandler> initialize
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/50-protocol-handler-procs.tcl
Setup connection object and authenticate user
- Testcases:
- No testcase defined.
Source code: ad_conn -reset # # Make sure, there is no ::ad_conn(request); otherwise the # developer support will add all its output to a single var, which # can lead easily to running out of resources in busy sites. When # unset, the developer support will create its own id. unset -nocomplain ::ad_conn(request) set :uri [ns_urldecode [ns_conn url]] if {[string length ${:uri}] < [string length ${:url}]} {append :uri /} set url_regexp "^${:url}" regsub $url_regexp ${:uri} {} :uri if {![regexp {^[./]} ${:uri}]} {set :uri /${:uri}} #:log "--conn_setup: uri '${:uri}' url='${:url}' con='[ns_conn url]'" :set_user_id set :method [string toupper [ns_conn method]] #:log "--conn_setup: uri '${:uri}' method ${:method}" set :urlv [split [string trim ${:uri} "/"] "/"] set :user_agent [ns_set iget [ns_conn headers] user-agent] set :destination [ns_urldecode [ns_set iget [ns_conn headers] Destination]] if {${:destination} ne ""} { regsub {https?://[^/]+/} ${:destination} {/} dest regsub $url_regexp $dest {} :destination if {![regexp {^[./]} ${:destination}]} {set :destination /${:destination}} } :log "--conn_setup: method ${:method} destination '${:destination}' uri '${:uri}' peer [ns_conn peeraddr]"XQL Not present: Generic, PostgreSQL, Oracle