apr_table_setn(r->headers_out, "Last-Modified", datestr);
}
- ap_set_etag(r);
- if ((errstatus = ap_meets_conditions(r)) != OK) {
- return errstatus;
- }
-
/* ap_set_content_length() always converts the same number and never
* returns an error. Accelerate it.
*/
r->clength = match->finfo.size;
apr_table_setn(r->headers_out, "Content-Length", match->sizestr);
+ ap_set_etag(r);
+ if ((errstatus = ap_meets_conditions(r)) != OK) {
+ return errstatus;
+ }
+
/* Call appropriate handler */
if (!r->header_only) {
if (match->is_mmapped == TRUE)
ap_set_etag(r);
apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");
ap_set_content_length(r, r->finfo.size);
+ if (bld_content_md5) {
+ apr_table_setn(r->headers_out, "Content-MD5",
+ ap_md5digest(r->pool, fd));
+ }
bb = apr_brigade_create(r->pool, c->bucket_alloc);
r->status = errstatus;
}
else {
- if (bld_content_md5) {
- apr_table_setn(r->headers_out, "Content-MD5",
- ap_md5digest(r->pool, fd));
- }
-
e = apr_brigade_insert_file(bb, fd, 0, r->finfo.size, r->pool);
#if APR_HAS_MMAP