ywatase
unread,Nov 29, 2010, 9:17:08 AM11/29/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Siege Users
Hi.
On my environment, siege can't store cookie which isn't set expire
time.
my environment
OS: Debian squeeze 64bit
CPU: Intel Core2Duo
GCC: gcc (Debian 4.4.5-6) 4.4.5
exactlly speaking, siege store cookie but cookie will expire
immediately.
In cookie.c line 83, 1 regard as 32bit integer but on my env time_t is
64bit integer and ck->expires default value become 1. so always ck-
>expires less than now and cookie will delete.
Please check my patch.
diff -ru siege-2.70/src/cookie.c siege-2.70.patched/src/cookie.c
--- siege-2.70/src/cookie.c 2010-05-08 23:55:12.000000000 +0900
+++ siege-2.70.patched/src/cookie.c 2010-11-29 22:58:24.410809873
+0900
@@ -80,7 +80,7 @@
ck->expires = 0;
ck->expires = ~ck->expires;
if(ck->expires < 0){
- ck->expires = ~(1 << ((sizeof(ck->expires) * 8) - 1));
+ ck->expires = ~((time_t) 1 << ((sizeof(ck->expires) * 8) - 1));
}
if(ck->expires < 0){
ck->expires = (ck->expires >> 1) * -1;