From 63b84d4f2b3dd2369277766344e1483844e3d8cc Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 25 Feb 2008 16:02:21 -0600 Subject: [PATCH 1/2] fix furnace --- extra/http/server/responders/responders.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/http/server/responders/responders.factor b/extra/http/server/responders/responders.factor index 5e0a5d57d9..ac317e2605 100755 --- a/extra/http/server/responders/responders.factor +++ b/extra/http/server/responders/responders.factor @@ -77,7 +77,7 @@ SYMBOL: max-post-request 1024 256 * max-post-request set-global : content-length ( header -- n ) - "content-length" peek-at string>number dup [ + "content-length" swap peek-at string>number dup [ dup max-post-request get > [ "Content-Length > max-post-request" throw ] when From ce94ca20dc2de59e45c2af8ced4d6397f3baf7f4 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 25 Feb 2008 16:02:53 -0600 Subject: [PATCH 2/2] use generate to make session ids --- extra/furnace/furnace.factor | 1 - extra/furnace/sessions/sessions.factor | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/extra/furnace/furnace.factor b/extra/furnace/furnace.factor index 11ff697049..590b3c82a7 100755 --- a/extra/furnace/furnace.factor +++ b/extra/furnace/furnace.factor @@ -204,4 +204,3 @@ SYMBOL: model ] [ drop ] if ; - diff --git a/extra/furnace/sessions/sessions.factor b/extra/furnace/sessions/sessions.factor index 579e5a607e..cf03fee6b1 100755 --- a/extra/furnace/sessions/sessions.factor +++ b/extra/furnace/sessions/sessions.factor @@ -1,5 +1,5 @@ USING: assocs calendar init kernel math.parser -namespaces random boxes alarms ; +namespaces random boxes alarms combinators.lib ; IN: furnace.sessions SYMBOL: sessions @@ -11,9 +11,8 @@ SYMBOL: sessions ] "furnace.sessions" add-init-hook : new-session-id ( -- str ) - 4 big-random >hex - dup sessions get-global key? - [ drop new-session-id ] when ; + [ 4 big-random >hex ] + [ sessions get-global key? not ] generate ; TUPLE: session id namespace alarm user-agent ;