rp_serve_concrete_file (public)
rp_serve_concrete_file file
Defined in packages/acs-tcl/tcl/request-processor-procs.tcl
Serves a file.
- Parameters:
- file (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set extension [ad_file extension $file] set startclicks [clock clicks -microseconds] if { [nsv_exists rp_extension_handlers $extension] } { set handler [nsv_get rp_extension_handlers $extension] #ns_log notice "check for extension handler for <$file> ==> <$handler>" ad_try -auto_abort=false { ds_init $handler } trap {AD EXCEPTION ad_script_abort} {r} { # # swallow script_aborts silently # #ns_log notice "rp_serve_concrete_file: swallow ad_script_abort" } on error {errMsg} { # # raise true exception # #ns_log notice "rp_serve_concrete_file: on error $errMsg" ds_add rp [list serve_file [list $file $handler] $startclicks [clock clicks -microseconds] error "$::errorCode: $::errorInfo"] return -code error -errorcode $::errorCode -errorinfo $::errorInfo $errMsg } on ok {r} { ds_add rp [list serve_file [list $file $handler] $startclicks [clock clicks -microseconds]] } finally { rp_finish_serving_page } } elseif { [rp_file_can_be_public_p $file] } { set type [ns_guesstype $file] ds_add rp [list serve_file [list $file $type] $startclicks [clock clicks -microseconds]] ns_returnfile 200 $type $file } else { ad_raise notfound }XQL Not present: Generic, PostgreSQL, Oracle