I'm experimenting with the althttpd.c web server.  As a simple first test I
created a static html file and a lua script file.  The static file displays
as expected in firefox.  The lua file, which simply reads in the same
static html file and writes it back to stdout ends up being truncated and
displayed incorrectly in firefox.

If I begin the output of the script with a newline and then continue
writing out the rest of the static file contents it's fine.

The section of source code and comment that starts at line number 1706 and
continues through line 1733 seems to be the section that's causing it.  I
took the entire block out, recompiled and tested the lua script again
(without starting output with a newline) and it worked as expected.  So the
script just read in the static file and spit it back out unaltered and it
displays the same as the static file in my browser.  The returned headers
are different but the returned html is the same.

What is the correct approach?  Should I return some minimum set of headers
from the CGI script? Content type seems to be conspicuously absent when
comparing the headers between the static file and CGI script.  Or should I
just start all script output with a newline?

Thanks,
Carl
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to