Skip to content

Commit

Permalink
Fix gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Miller committed Nov 13, 2011
1 parent 2657fc8 commit f8ba503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.markdown
Expand Up @@ -61,6 +61,6 @@ Tip 2: To save bandwidth, add a "Last-Modified" header in the upstream response;
mod_zip will then honor the "If-Range" header from clients.

Tip 3: To wipe the X-Archive-Files header from the response sent to the client,
add "proxy_hide_header X-Archive-Files;" to your nginx.conf
use the headers_more module: http://wiki.nginx.org/NginxHttpHeadersMoreModule

Questions/patches may be directed to Evan Miller, emmiller@gmail.com.
6 changes: 3 additions & 3 deletions ngx_http_zip_file.c
Expand Up @@ -354,18 +354,18 @@ ngx_http_zip_file_header_chain_link(ngx_http_request_t *r, ngx_http_zip_ctx_t *c
if (ctx->unicode_path) {
local_file_header.flags &= ~zip_utf8_flag;
}
extra_field_zip64 = ngx_zip_extra_field_zip64_sizes_only_template;
if (file->need_zip64) {
local_file_header.version = zip_version_zip64;
local_file_header.extra_field_len = sizeof(ngx_zip_extra_field_zip64_sizes_only_t) + sizeof(ngx_zip_extra_field_local_t);
extra_field_zip64 = ngx_zip_extra_field_zip64_sizes_only_template;
extra_field_zip64.uncompressed_size = extra_field_zip64.compressed_size = file->size;
} else {
local_file_header.compressed_size = file->size;
local_file_header.uncompressed_size = file->size;
}

extra_field_unicode_path = ngx_zip_extra_field_unicode_path_template;
if (ctx->unicode_path) {
extra_field_unicode_path = ngx_zip_extra_field_unicode_path_template;
extra_field_unicode_path.crc32 = file->filename_utf8_crc32;
extra_field_unicode_path.size = sizeof(ngx_zip_extra_field_unicode_path_t) + file->filename_utf8.len;

Expand Down Expand Up @@ -573,8 +573,8 @@ ngx_http_zip_write_central_directory_entry(u_char *p, ngx_http_zip_file_t *file,
extra_field_central = ngx_zip_extra_field_central_template;
extra_field_central.mtime = file->unix_time;

extra_field_unicode_path = ngx_zip_extra_field_unicode_path_template;
if (ctx->unicode_path) {
extra_field_unicode_path = ngx_zip_extra_field_unicode_path_template;
extra_field_unicode_path.crc32 = file->filename_utf8_crc32;
extra_field_unicode_path.size = sizeof(ngx_zip_extra_field_unicode_path_t) + file->filename_utf8.len;

Expand Down

0 comments on commit f8ba503

Please sign in to comment.