Martin, In message <4A000000-00XF-428D-8DA5-24285EBB7827@ilink.de> on 04/25/06(02:06:00) you Martin Vetter <pnieabdyi-qprr6ub3rja6.ml@delegate.org> wrote: |I would like to use a perl-based CFI filter, |using delegate 9.1.1 on Windows 2000 SP4: ... |then I use the filter via the CFI file: | | dg9_1_1.exe -P12345 SERVER=http FTOCL=filter.cfi DGROOT=tmp |ADMIN=no@admin.. -f -v | |the very first HTML character (the "<" of "<HEAD>") is missing !? :o( ... |what am I missing or doing wrong? It's wrong for you to use DeleGate on Windows, espacially with a little complecated features like CFI :p The first byte seems buffered in the FILE structure with non-buffering mode and lost when it returns to buffering mode. Thus it can be fixed as the enclosed patch. Cheers, Yutaka -- D G Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/ ( - ) National Institute of Advanced Industrial Science and Technology _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan Do the more with the less -- B. Fuller *** delegate9.1.1/filters/cfi.c Sun Jul 3 05:58:05 2005 --- cc/filters/cfi.c Tue Apr 25 04:08:18 2006 *************** *** 143,150 **** --- 143,157 ---- } }else head = stralloc(""); if( isWindows() ){ + int ch = EOF; /* restart buffering ... */ + if( ready_cc(in) ){ + ch = getc(in); + } in = fdopen(fileno(in),"r"); + if( ch != EOF ){ + ungetc(ch,in); + } } setQStr(head,(char*)realloc((char*)head, strlen(head)+2048),