Skip to content
Browse files

Fix gcc warnings

  • Loading branch information...
1 parent 2657fc8 commit f8ba5038ef6a907533137a9327230296d6e203c3 Evan Miller committed
Showing with 4 additions and 4 deletions.
  1. +1 −1 README.markdown
  2. +3 −3 ngx_http_zip_file.c
View
2 README.markdown
@@ -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.
View
6 ngx_http_zip_file.c
@@ -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;
@@ -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;

0 comments on commit f8ba503

Please sign in to comment.
Something went wrong with that request. Please try again.