tdav::respond (public)
tdav::respond response
Defined in packages/oacs-dav/tcl/tDAV-procs.tcl
Send a WebDAV response. Format the response for the current HTTP method, with a plain text response for HTTP 423.
- Parameters:
- response (required)
- List starting with the HTTP status code, followed by method-specific response data.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set response_code [lindex $response 0] if {"423" eq $response_code} { set response_body "The resource is locked" set mime_type "text/plain" } else { set response_list [tdav::respond::[string tolower [ns_conn method]] $response] lassign $response_list response_body mime_type if {$mime_type eq ""} { set mime_type "text/plain" } if {[string match "text/xml*" $mime_type]} { set response_body [encoding convertto utf-8 $response_body] } } ns_log debug "\n ----- tdav litmus headers ----- \n [ns_set iget [ns_conn headers] X-Litmus] \n -----\n" ns_log debug "\n ----- tdav::response response_body ----- \n $response_body \n ----- end ----- \n" ns_return $response_code $mime_type $response_bodyXQL Not present: Generic, PostgreSQL, Oracle