Defined in
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
-
No testcase defined.
Source code:
variable $token
upvar 0 $token state
array set options [list -mode write]
array set options $args
switch -- [set lower [string tolower $key]] {
content-md5
-
content-type
-
content-transfer-encoding
-
mime-version {
error "key $key may not be set"
}
default {# Skip key}
}
array set header $state(header)
if {[set x [lsearch -exact $state(lowerL) $lower]] < 0} {
if {$options(-mode) eq "delete"} {
error "key $key not in header"
}
lappend state(lowerL) $lower
lappend state(mixedL) $key
set result {}
} else {
set result $header($lower)
}
switch -- $options(-mode) {
append {
lappend header($lower) $value
}
delete {
unset header($lower)
set state(lowerL) [lreplace $state(lowerL) $x $x]
set state(mixedL) [lreplace $state(mixedL) $x $x]
}
write {
set header($lower) [list $value]
}
default {
error "unknown value for -mode $options(-mode)"
}
}
set state(header) [array get header]
return $result
XQL Not present:Generic, PostgreSQL, Oracle