diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-05 10:24:05 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-05 10:24:05 (GMT) |
commit | 8d9808cb4d764dfccb1a35db84a1ad6a58b31f70 (patch) | |
tree | 77b1712ae187522037a6716164c81d54c546bf64 /library/http | |
parent | fa56a98ba9b5e567d53181939645c71ccdfc6cfc (diff) | |
download | tcl-8d9808cb4d764dfccb1a35db84a1ad6a58b31f70.zip tcl-8d9808cb4d764dfccb1a35db84a1ad6a58b31f70.tar.gz tcl-8d9808cb4d764dfccb1a35db84a1ad6a58b31f70.tar.bz2 |
closer to working
Diffstat (limited to 'library/http')
-rw-r--r-- | library/http/cookiejar.tcl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/http/cookiejar.tcl b/library/http/cookiejar.tcl index 054698f..bd85b46 100644 --- a/library/http/cookiejar.tcl +++ b/library/http/cookiejar.tcl @@ -1,4 +1,5 @@ package require Tcl 8.6 +package require http 2.8.4 package require sqlite3 package provide cookiejar 0.1 @@ -66,7 +67,7 @@ namespace eval ::http { db eval { SELECT COUNT(*) AS cookieCount FROM cookies } - if {$cookieCount} { + if {[info exist cookieCount] && $cookieCount} { http::Log "loaded cookie store from $path with $cookieCount entries" } @@ -134,8 +135,8 @@ namespace eval ::http { db close } - method GetCookiesForHostAndPath {result host path} { - upvar 1 $result result + method GetCookiesForHostAndPath {*result host path} { + upvar 1 ${*result} result db eval { SELECT key, value FROM cookies WHERE domain = $host AND path = $path |