util::request_info (public)
util::request_info [ -with_headers ]
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Produce a string containing the detailed request information. This is in particular useful for debugging, when errors are raised.
- Switches:
- -with_headers (optional, boolean, defaults to
"false"
)- Include request headers
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set info "" if {[ns_conn isconnected]} { # # Base information # append info " " [ns_conn method] " [util_current_location][ns_conn url]?[ns_conn query]" " referred by '[get_referrer]' peer [ad_conn peeraddr] user_id [ad_conn user_id]" if {[ns_conn method] eq "POST"} { # # Include form data when it is available via [ns_form], # but remove sensible information from logging. # set form [ns_getform] if {[ns_set get $form password] ne ""} { ns_set iupdate $form password XXXXX } foreach {k v} [ns_set array $form] { if {[string length $v] > 100} { set v "[string range $v 0 100]..." } append info "\n $k: $v" } } # # Optional header info # if {$with_headers_p} { append info \n [util::ns_set_pretty_print [ns_conn headers]] } } return $infoXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/utilities-procs.xql