Project

General

Profile

Bug #1027 » lighttpd-1.4.19-compress-mkdir.patch

Optimization patch for 1.4.19 - spillgroup, 2008-03-12 13:56

View differences:

lighttpd-1.4.19/src/mod_compress.c 2008-03-12 14:36:00.000000000 +0100
buffer_append_string_buffer(p->ofn, sce->etag);
if (-1 == mkdir_for_file(p->ofn->ptr)) {
log_error_write(srv, __FILE__, __LINE__, "sb", "couldn't create directory for file", p->ofn);
return -1;
}
if (-1 == (ofd = open(p->ofn->ptr, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0600))) {
if (errno == EEXIST) {
/* cache-entry exists */
......
return 0;
}
log_error_write(srv, __FILE__, __LINE__, "sbss", "creating cachefile", p->ofn, "failed", strerror(errno));
if (-1 == mkdir_for_file(p->ofn->ptr)) {
log_error_write(srv, __FILE__, __LINE__, "sb", "couldn't create directory for file", p->ofn);
return -1;
}
return -1;
if (-1 == (ofd = open(p->ofn->ptr, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0600))) {
log_error_write(srv, __FILE__, __LINE__, "sbss", "creating cachefile", p->ofn, "failed", strerror(errno));
return -1;
}
}
#if 0
log_error_write(srv, __FILE__, __LINE__, "bs", p->ofn, "compress-cache miss");
(4-4/4)