diff --git a/ngx_http_zip_file.c b/ngx_http_zip_file.c index 3e0e482..ce47c0e 100644 --- a/ngx_http_zip_file.c +++ b/ngx_http_zip_file.c @@ -499,10 +499,7 @@ ngx_http_zip_file_header_chain_link(ngx_http_request_t *r, ngx_http_zip_ctx_t *c b->memory = 1; b->last = b->pos + len; -#if (NGX_HTTP_SSL) - b->flush = !!r->connection->ssl; -#endif - + /* A note about the ZIP format: in order to appease all ZIP software I * could find, the local file header contains the file sizes but not the * CRC-32, even though setting the third bit of the general purpose bit diff --git a/ngx_http_zip_module.c b/ngx_http_zip_module.c index c9d4838..6e0cdc2 100644 --- a/ngx_http_zip_module.c +++ b/ngx_http_zip_module.c @@ -683,6 +683,9 @@ ngx_http_zip_send_pieces(ngx_http_request_t *r, pieces_sent++; ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "mod_zip: no ranges / sending piece type %d", piece->type); rc = ngx_http_zip_send_piece(r, ctx, piece, NULL); + if (rc == NGX_AGAIN && r->connection->buffered && !r->postponed) { + rc = NGX_OK; + } } break; case 1: