Changeset 2098
- Timestamp:
- 02/27/2008 12:15:38 PM (6 months ago)
- Location:
- branches/lighttpd-1.4.x
- Files:
-
- 2 modified
-
NEWS (modified) (1 diff)
-
src/connections.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.4.x/NEWS
r2097 r2098 41 41 * fixed mod-proxy.t to run with a builddir outside of the src dir 42 42 * do not suppress content on "307 Temporary Redirect" (#1412) 43 * fixed Content-Length header if response body gets removed in connections.c (#1412, part 2) 43 44 44 45 - 1.4.18 - 2007-09-09 -
branches/lighttpd-1.4.x/src/connections.c
r2097 r2098 399 399 response_header_insert(srv, con, CONST_STR_LEN("Allow"), CONST_STR_LEN("OPTIONS, GET, HEAD, POST")); 400 400 401 con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED; 402 con->parsed_response &= ~HTTP_CONTENT_LENGTH; 403 401 404 con->http_status = 200; 402 405 con->file_finished = 1; … … 513 516 /* disable chunked encoding again as we have no body */ 514 517 con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED; 518 con->parsed_response &= ~HTTP_CONTENT_LENGTH; 515 519 chunkqueue_reset(con->write_queue); 516 520 … … 518 522 break; 519 523 } 520 521 524 522 525 if (con->file_finished) { … … 538 541 con->http_status == 204 || 539 542 con->http_status == 304) { 543 data_string *ds; 540 544 /* no Content-Body, no Content-Length */ 545 if (NULL != (ds = (data_string*) array_get_element(con->response.headers, "Content-Length"))) { 546 buffer_reset(ds->value); // Headers with empty values are ignored for output 547 } 541 548 } else if (qlen >= 0) { 542 549 /* qlen = 0 is important for Redirects (301, ...) as they MAY have … … 584 591 * without the content 585 592 */ 593 con->file_finished = 1; 594 586 595 chunkqueue_reset(con->write_queue); 587 596 con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED;

