tdav::check_lock_for_unlock
tdav::check_lock_for_unlock
- Testcases:
- No testcase defined.
Source code: regsub {^/} $uri {} uri # if lock exists, work. if not, just return. if {[file exists [tdav::get_lock_file $uri]]} { set hdr [ns_set iget [ns_conn headers] {Lock-Token}] # the If header exists, work, otherwise 423 if {[info exists hdr] && [string length $hdr]} { regexp {<([^>]+)>} $hdr nil token set ftk [lindex [tdav::read_lock $uri] 3] if {[info exists token] && $token eq $ftk} { # it's good, the tokens match. carry on. } else { return filter_return } } else { return filter_return } # also check for uri == hdr_uri } return unlockedXQL Not present: Generic, PostgreSQL, Oracle