Bug #213
closedtext/plain output for cgi
Description
Everything is working for me with Firefox (1.0.6) in linux, but under Windows IE sees the page as text not html, and Firefox (1.0.6) sees the page as text (page info shows it as text/plain) and a number.
Firefox shows the source like this (truncated to first 9 lines):
424 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!-- ViewCVS - http://viewcvs.sourceforge.net/ by Greg Stein - mailto:gstein@lyra.org -->
IE has all those blank spaces in front but not the 424.
ViewCVS is a python script. lighttpd was built from the Gentoo ebuild.
-- DannyDaemonic
Updated by jan over 19 years ago
- Status changed from New to Assigned
Please verify that changeset r597 fixes this problem.
Updated by Anonymous over 19 years ago
Hmm, sorry. It looks like this didn't fix the problem.
To be sure I did this right, this is the patch I used.
--- branches/lighttpd-merge-1.4.x/src/connections.c (revision 596) +++ branches/lighttpd-merge-1.4.x/src/connections.c (revision 597) @@ -431,11 +431,13 @@ if (con->file_finished) { - /* content-len */ + /* we have all the content and chunked encoding is not used, set a content-length */ - buffer_copy_off_t(srv->tmp_buf, chunkqueue_length(con->write_queue)); + if ((con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) == 0) { + buffer_copy_off_t(srv->tmp_buf, chunkqueue_length(con->write_queue)); - response_header_overwrite(srv, con, CONST_STR_LEN("Content-Length"), CONST_BUF_LEN(srv->tmp_buf)); + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Length"), CONST_BUF_LEN(srv->tmp_buf)); + } } else { /* disable keep-alive if size-info for the body is missing */ if ((con->parsed_response & HTTP_CONTENT_LENGTH) &&
Is there a way to log the entire request and lighttpd's reply? Is there anything else I can do to help?
-- DannyDaemonic
Updated by jan over 19 years ago
you can enable them by using:
debug.log-request-header = "enable"
debug.log-response-header = "enable"
The real help would be using strace in the way described in
Updated by Anonymous over 19 years ago
Just for the record, I sent it to your email address.
Thanks for looking into the bug.
-- DannyDaemonic
Updated by Anonymous over 19 years ago
Thanks. For anyone else following this, Changeset #601 fixed the problem.
http://trac.lighttpd.net/trac/changeset/601
-- DannyDaemonic
Also available in: Atom