You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: rbi/zip_kit.rbi
+13-4
Original file line number
Diff line number
Diff line change
@@ -1897,13 +1897,11 @@ end, T.untyped)
1897
1897
1898
1898
# Add a fake entry to the archive, to see how big it is going to be in the end.
1899
1899
#
1900
-
# data descriptor to specify size
1901
-
#
1902
1900
# _@param_ `filename` — the name of the file (filenames are variable-width in the ZIP)
1903
1901
#
1904
1902
# _@param_ `size` — size of the uncompressed entry
1905
1903
#
1906
-
# _@param_ `use_data_descriptor` — whether the entry uses a postfix
1904
+
# _@param_ `use_data_descriptor` — whether there is going to be a data descriptor written after the entry body, to specify size. You must enable this if you are going to be using {Streamer#write_stored_file} as otherwise your estimated size is not going to be accurate
# _@param_ `compressed_size` — size of the compressed entry
1919
1917
#
1920
-
# _@param_ `use_data_descriptor` — whether the entry uses a postfix data descriptor to specify size
1918
+
# _@param_ `use_data_descriptor` — whether there is going to be a data descriptor written after the entry body, to specify size. You must enable this if you are going to be using {Streamer#write_deflated_file} as otherwise your estimated size is not going to be accurate
1921
1919
#
1922
1920
# _@return_ — self
1923
1921
sigdo
@@ -2102,6 +2100,17 @@ end, T.untyped)
2102
2100
# ones - for example, specific content types are needed for files which are, technically, ZIP files
2103
2101
# but are of a file format built "on top" of ZIPs - such as ODTs, [pkpass files](https://developer.apple.com/documentation/walletpasses/building_a_pass)
2104
2102
# and ePubs.
2103
+
#
2104
+
# More value, however, is in the "technical" headers this method will provide. It will take the following steps to make sure streaming works correctly.
2105
+
#
2106
+
# * `Last-Modified` will be set to "now" so that the response is considered "fresh" by `Rack::ETag`. This is done so that `Rack::ETag` won't try to
2107
+
# calculate a lax ETag value and thus won't start buffering your response out of nowhere
2108
+
# * `Content-Encoding` will be set to `identity`. This is so that proxies or the Rack middleware that applies compression to the response (like gzip)
2109
+
# is not going to try to compress your response. It also tells the receiving browsers (or downstream proxies) that they should not attempt to
2110
+
# open or uncompress the response before saving it or passing it onwards.
2111
+
# * `X-Accel-Buffering` will be set to 'no` - this tells both nginx and the Google Cloud load balancer that the response should not be buffered
2112
+
#
2113
+
# These header values are known to get as close as possible to guaranteeing streaming on most environments where Ruby web applications may be hosted.
0 commit comments