summaryrefslogtreecommitdiffstats
path: root/library/http
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-31 10:52:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-31 10:52:29 (GMT)
commit99af655c4c86349d99454dd9c6879ec83e32f1f2 (patch)
tree7ee152d16c771c6b841651d00286edcaadc30ed9 /library/http
parent4085af6b839b1d001f885832635c83835900d1ec (diff)
downloadtcl-99af655c4c86349d99454dd9c6879ec83e32f1f2.zip
tcl-99af655c4c86349d99454dd9c6879ec83e32f1f2.tar.gz
tcl-99af655c4c86349d99454dd9c6879ec83e32f1f2.tar.bz2
some small tinkerings
Diffstat (limited to 'library/http')
-rw-r--r--library/http/cookiejar.tcl16
1 files changed, 9 insertions, 7 deletions
diff --git a/library/http/cookiejar.tcl b/library/http/cookiejar.tcl
index be446a1..e6c1e85 100644
--- a/library/http/cookiejar.tcl
+++ b/library/http/cookiejar.tcl
@@ -42,9 +42,9 @@ namespace eval ::http {
db eval {
CREATE TABLE IF NOT EXISTS cookies (
id INTEGER PRIMARY KEY,
- origin TEXT NOT NULL,
+ origin TEXT NOT NULL COLLATE NOCASE,
path TEXT NOT NULL,
- domain TEXT,
+ domain TEXT COLLATE NOCASE,
key TEXT NOT NULL,
value TEXT NOT NULL,
expiry INTEGER NOT NULL);
@@ -53,9 +53,9 @@ namespace eval ::http {
}
db eval {
CREATE TEMP TABLE IF NOT EXISTS sessionCookies (
- origin TEXT NOT NULL,
+ origin TEXT NOT NULL COLLATE NOCASE,
path TEXT NOT NULL,
- domain TEXT,
+ domain TEXT COLLATE NOCASE,
key TEXT NOT NULL,
value TEXT NOT NULL);
CREATE UNIQUE INDEX IF NOT EXISTS sessionUnique
@@ -66,9 +66,11 @@ namespace eval ::http {
if {$path ne ""} {
db transaction {
- if {[catch {
- db eval {SELECT * FROM forbidden LIMIT 1}
- }]} {
+ db eval {
+ SELECT count(*) AS present FROM sqlite_master
+ WHERE type='table' AND name='forbidden'
+ }
+ if {!$present} {
my InitDomainList
}
}