Posted to tcl by andrewsh at Thu Dec 22 22:25:29 GMT 2011view raw

  1. if {[string match *net/channel* [dict get $response -path]]} {
  2. lassign [Http Credentials $response] u p
  3. if {! (("$u" eq "usr") && ("$p" eq "pwd"))} {
  4. set response [Http Unauthorized $response [Http BasicAuth channel]]
  5. }
  6. }
  7.