Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stalled connections where SSL buffer is not full #103

Merged
merged 3 commits into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ngx_http_zip_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ngx_http_zip_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down