diff options
| author | Will Jordan <will@code.org> | 2021-04-26 11:47:44 -0700 |
|---|---|---|
| committer | Will Jordan <will@code.org> | 2021-04-26 11:48:48 -0700 |
| commit | dd23436ab5ee502d412b3aee1aa234ef6cab5d6d (patch) | |
| tree | 7bbccaaa6dbe1229b68fb425cdae8e6cabf0ab12 | |
| parent | 2c95c7d1eb2f743f64c134bde06c92be24a70717 (diff) | |
| download | rack-dd23436ab5ee502d412b3aee1aa234ef6cab5d6d.tar.gz | |
Update SPEC to clarify streaming response body behavior
Strings must be processed individually as they are yielded by `each`.
However, if the Body responds to `to_ary` it can be implicitly coerced to
an Array, which may then be processed all at once.
| -rw-r--r-- | SPEC.rdoc | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -283,6 +283,10 @@ to that produced by calling +each+; this may be used by the server as an alternative, possibly more efficient way to transport the response. +Strings must be processed individually as they are yielded by +each+. +However, if the Body responds to +to_ary+ it can be implicitly coerced to +an Array, which may then be processed all at once. + The Body commonly is an Array of Strings, the application instance itself, or a File-like object. == Thanks |
