cf.time = ext->time;
cf.log = ext->log;
- name = ngx_alloc(to->len + 1 + 10, ext->log);
+ name = ngx_alloc(to->len + 1 + 10 + 1, ext->log);
if (name == NULL) {
return NGX_ERROR;
}
- (void) ngx_sprintf(name, "%*s.%010uD%Z", to->len - 1, to->data,
+ (void) ngx_sprintf(name, "%*s.%010uD%Z", to->len, to->data,
(uint32_t) ngx_next_temp_number(0));
if (ngx_copy_file(src->data, name, &cf) == NGX_OK) {
ngx_http_map_uri_to_path(r, &path, &root, 0);
+ path.len--;
+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http put filename: \"%s\"", path.data);
}
}
+ path.len--;
+
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"upstream stores \"%s\" to \"%s\"",
tf->file.name.data, path.data);