diff -bu fhttpd-0.3.4/Makefile /home/abelits/fhttpd-0.3.4/Makefile --- fhttpd-0.3.4/Makefile Thu Feb 12 01:35:28 1998 +++ /home/abelits/fhttpd-0.3.4/Makefile Mon Mar 30 17:12:28 1998 @@ -31,7 +31,7 @@ #LD = /opt/SUNWspro/bin/CC #COPTS = -DLS_OPTIONS_IGNORE -DMUST_ALIGN -DNO_SNPRINTF\ # -DSOLARIS -DUSE_GETSPNAM -DNEED_CRYPT_H -DBSD43_MSGHDR\ -# -DMAP_FILE=0 -DGETOPT_VARS_NOT_DEFINED\ +# -DMAP_FILE=0 -DGETOPT_VARS_NOT_DEFINED -DGLOBAL_TIMEZONE\ # -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ # -D__s32=int # -DFCNTL_LOCK #LFLAGS = -lsocket -lnsl diff -bu fhttpd-0.3.4/fhttpd-file.cc /home/abelits/fhttpd-0.3.4/fhttpd-file.cc --- fhttpd-0.3.4/fhttpd-file.cc Thu Feb 12 01:36:56 1998 +++ /home/abelits/fhttpd-0.3.4/fhttpd-file.cc Sun Mar 29 15:21:39 1998 @@ -689,6 +689,16 @@ if(server->infd<0) exit(1); } +if(server->infd==0&&server->outfd==1){ + int fd2; + close(2); + fd2=open("/dev/null",O_WRONLY); + if(fd2!=2){ + dup2(fd2,2); + close(fd2); + } + } + setcapabilities(server,APP_CAP_KEEPALIVE); readconfig(configfile); diff -bu fhttpd-0.3.4/util.cc /home/abelits/fhttpd-0.3.4/util.cc --- fhttpd-0.3.4/util.cc Mon Feb 9 07:48:44 1998 +++ /home/abelits/fhttpd-0.3.4/util.cc Mon Mar 30 16:34:29 1998 @@ -156,11 +156,13 @@ time_t t; int i; char tmpstr[80]; -char *p1=NULL,*p2=NULL,*p3=NULL,*p4=NULL,*p5=NULL; -struct tm ttm={0,0,0,0,0,70,0,0,0}; - +char *ptmp,*p1=NULL,*p2=NULL,*p3=NULL,*p4=NULL,*p5=NULL; +struct tm ttm; +memset((char*)&ttm,0,sizeof(ttm)); strncpy(tmpstr,s,80); tmpstr[79]=0; +ptmp=strchr(tmpstr,';'); +if(ptmp) *ptmp=0; p1=strchr(tmpstr,','); if(p1){ *p1=0; @@ -172,10 +174,14 @@ p2++; } p3=strchr(p1,'-'); + ptmp=strchr(p1,' '); + if(ptmp&&(!p3||p3>ptmp)) p3=ptmp; if(p3){ *p3=0; p3++; p4=strchr(p3,'-'); + ptmp=strchr(p3,' '); + if(ptmp&&(!p4||p4>ptmp)) p4=ptmp; if(p4){ *p4=0; p4++; @@ -199,13 +205,13 @@ } } if(i==13){ - ttm.tm_isdst=0; + ttm.tm_isdst=-1; t=mktime(&ttm); #ifdef GLOBAL_TIMEZONE t-=timezone; #else #ifdef TM_GMTOFF_PRESENT - t-=localtime(&t)->tm_gmtoff; + t+=localtime(&t)->tm_gmtoff; #endif #endif return t;