Skip to content

Commit

Permalink
Comment the buffering case
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Feb 3, 2024
1 parent 9d74325 commit 972d57c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/zipline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def zipline(files, zipname = 'zipline.zip', **kwargs_for_new)
# If HTTP/1.0 is used it is not possible to stream, and if that happens it usually will be
# unclear why buffering is happening. Some info in the log is the least one can do.
logger.warn { "The downstream HTTP proxy/LB insists on HTTP/1.0 protocol, ZIP response will be buffered." } if logger

# Here it would be good natured to to read and save the ZIP into a tempfile, and serve it from there.
# Rack has a Rack::TempfileReaper middleware which could be used for that etc. Maybe one day.
self.response_body = zip_generator
else
# Disable buffering for both nginx and Google Load Balancer, see
Expand Down

0 comments on commit 972d57c

Please sign in to comment.