diff -ruN ./0.5/config.h ./0.6/config.h --- ./0.5/config.h Mon May 13 20:29:56 2002 +++ ./0.6/config.h Tue May 14 13:54:47 2002 @@ -1,2 +1,2 @@ #define TCP_PORT 8080 -#define VERSION "0.5" +#define VERSION "0.6" diff -ruN ./0.5/connection.c ./0.6/connection.c --- ./0.5/connection.c Wed May 15 18:05:15 2002 +++ ./0.6/connection.c Thu May 16 17:16:43 2002 @@ -8,7 +8,8 @@ } while (0) #define BAIL_OUT_EXIT do { connection->reply_filename = NON_EXISTENT_FILENAME; \ - return; \ + connection->do_set_cookie = 0; \ + return; \ } while (0) #if 1 #define DEBUG(x) (fprintf(stderr,x)) @@ -236,6 +237,8 @@ int i; i_name += time; + srandom(time); + i_name += random(); snprintf(name,RMDsize-2,"%d", i_name); if (name[0] == '\0') name[0]--; hashcode[0] = '\0'; @@ -283,6 +286,7 @@ connection->reply_filename = SEND_FILENAME; strcpy(S_cookie, ""); + connection->do_set_cookie = 0; @@ -315,6 +319,7 @@ BAIL_OUT; tmp_server_id = strtol(c_server_id, NULL, 10); connection->server_id = (int)tmp_server_id; + fprintf(stderr,"SERVER ID: %d\n",connection->server_id); len = (int) strlen(line); q++; while (q < len){ @@ -439,6 +444,8 @@ /* we need to create new item - only setting of first_visit_flag * differs from case to case (we know from got_V_cookie) */ + if (connection->server_id > MAX_SERVER_ID || connection->server_id == 0) + BAIL_OUT_EXIT; fprintf(stderr,"Received V cookie, no S cookie - creating new session, with first_visit_flag = 0\n"); connection->do_set_cookie = 1; connection->set_cookie = get_identifier( Binary files ./0.5/connection.o and ./0.6/connection.o differ diff -ruN ./0.5/errors.h ./0.6/errors.h --- ./0.5/errors.h Fri May 10 18:23:04 2002 +++ ./0.6/errors.h Thu May 16 17:10:46 2002 @@ -10,7 +10,8 @@ #define _404_TEXT "\n
"\ - "