Well felix webserver played up again. So now I thought, ha! I have log file
So I tried to look at it. And its full of shit: Fetching line ... Got the line length .. 0 Fetching line ... Got the line length .. 0 Fetching line ... Got the line length .. 0 Fetching line ... Got the line length .. 0 So Linux .. well Linux is a heap of shit. upstart is even worse crap. I'm out of space on the device: skaller@felix:~$ sudo ls -lasp /var/log/upstart total 14878072 12 drwxr-xr-x 2 root root 12288 Aug 7 08:33 ./ 4 drwxr-xr-x 7 root root 4096 Aug 7 08:40 ../ 108 -rw-r----- 1 root root 106496 Aug 7 08:31 felixweb.log 14860452 -rw-r----- 1 root root 15202234368 Aug 5 06:56 felixweb.log.1 17432 -rw-r----- 1 root root 17825792 Aug 5 06:56 felixweb.log.1.gz 64 -rw-r----- 1 root root 58132 Aug 4 06:48 felixweb.log.2.gz So now, lets see ... here's the code: match parse_get_line line with | None => match parse_post_line line with | Some (?base,?file) => println$ "well formed POST ..."; println$ "base=" + base; println$ "file=" + file; println$ "Rest of the POST message .."; var content-len = 0; var finished = false; while not finished do println$ "Fetching line ... "; get_line (k,&line); println$ "Got the line length .. "+line.len.str; println line; if prefix(line, "Content-Length: ") do var lstr = line.[16 to]; println$ "Content length string says " + lstr; content-len = lstr.int; println$ "Content length is " + content-len.str; finished = true; done done; var nbytes : int = content-len; var error =false; var buffer = C_hack::malloc (nbytes); read (k,&nbytes, buffer, &error); var content = string (C_hack::cast[+char] buffer, nbytes); C_hack::free buffer; println$ "Content (nbytes=" + nbytes.str+") = " + content; serve_not_implemented(k, file); | None => println$ "BAD request line: '"+line+"'"; endmatch; | Some (?base, ?file) => //print "well formed GET ...\n"; //print "base="; print base; endl; print "file="; print file; endl; serve_file(k,file); endmatch; SO ... someone is trying to POST crap to the server, and it goes into an infinite loop reading zero length lines. [It says "while not finished" .. :] gzip: /var/log/upstart/felixweb.log.1.gz: unexpected end of file I have to say LINUX SUCKS. It made the file. There's no POST in any log file. The code says there has to be. Grrr .. so: the raw felixweb.log has only fetches of 0 length lines. The log.2 file unzipped has only expected diagnostics and no POST line. Upstart screwed up making log.1.gz file, probably because it was out of disk space. however assuming it came first, before log.2, and the raw log file was the third .. well it's crap. ANYHOW .. a bug is located! The webserver expects and honest POST request and didn't get one. It should have bugged out. Easy to fix that one. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language