rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* [PATCH|PULL 0/2] chunked: limit to HTTP/1.1, undeprecate
@ 2022-09-01 21:45 Eric Wong
  2022-09-01 21:45 ` [PATCH 1/2] chunked: limit to HTTP/1.1 Eric Wong
  2022-09-01 21:45 ` [PATCH 2/2] chunked: remove deprecation warning Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2022-09-01 21:45 UTC (permalink / raw)
  To: rack-devel

Lets reduce the pain on end users upgrading to Rack 3.
HTTP/1.0 and HTTP/1.1 aren't going away, and I was dealing
with HTTP/0.9 until 2017.

Fwiw, probably 95% of people and organizations I know have
given up on Ruby due to constant treadmill of upgrades and
incompatibilities, so avoid giving them more reason to give
up Ruby due to more incompatibilities.

The following changes since commit 6aad5390403ca48a0ba76e426a21274385895731:

  The stream argument must implement `#<<`. (#1959) (2022-08-31 14:31:46 +1200)

are available in the Git repository at:

  https://80x24.org/rack.git chunk

for you to fetch changes up to e3945c3acc5a6e8d3af4cc8639dcb12fb85a8aee:

  chunked: remove deprecation warning (2022-09-01 21:34:23 +0000)

----------------------------------------------------------------
Eric Wong (2):
      chunked: limit to HTTP/1.1
      chunked: remove deprecation warning

 lib/rack/chunked.rb | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

-- 

--- 
You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rack-devel/20220901214536.5469-1-e%4080x24.org.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] chunked: limit to HTTP/1.1
  2022-09-01 21:45 [PATCH|PULL 0/2] chunked: limit to HTTP/1.1, undeprecate Eric Wong
@ 2022-09-01 21:45 ` Eric Wong
  2022-09-01 21:45 ` [PATCH 2/2] chunked: remove deprecation warning Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2022-09-01 21:45 UTC (permalink / raw)
  To: rack-devel

895beec0622d (chunked: do not chunk on pre-HTTP/1.0 clients, 2013-11-12)
was written in 2013 in anticipation of HTTP/1.2 and future versions
supporting chunked encoding.  As of 2022, HTTP/1.2 is yet to happen,
and is unlikely given HTTP/2 and HTTP/3 both exist.  So limit
chunking to HTTP/1.1, since HTTP/1.x will remain in use for years
to come, and there's still a few odd places using HTTP/0.9.
---
 lib/rack/chunked.rb | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/rack/chunked.rb b/lib/rack/chunked.rb
index 47fb36ac..004163d9 100644
--- a/lib/rack/chunked.rb
+++ b/lib/rack/chunked.rb
@@ -83,16 +83,9 @@ module Rack
       @app = app
     end
 
-    # Whether the HTTP version supports chunked encoding (HTTP 1.1 does).
+    # Whether the HTTP version supports chunked encoding (only HTTP 1.1 does).
     def chunkable_version?(ver)
-      case ver
-      # pre-HTTP/1.0 (informally "HTTP/0.9") HTTP requests did not have
-      # a version (nor response headers)
-      when 'HTTP/1.0', nil, 'HTTP/0.9'
-        false
-      else
-        true
-      end
+      ver == 'HTTP/1.1' # HTTP/2 doesn't, and HTTP/1.2 is unlikely
     end
 
     # If the rack app returns a response that should have a body,

-- 

--- 
You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rack-devel/20220901214536.5469-2-e%4080x24.org.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] chunked: remove deprecation warning
  2022-09-01 21:45 [PATCH|PULL 0/2] chunked: limit to HTTP/1.1, undeprecate Eric Wong
  2022-09-01 21:45 ` [PATCH 1/2] chunked: limit to HTTP/1.1 Eric Wong
@ 2022-09-01 21:45 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2022-09-01 21:45 UTC (permalink / raw)
  To: rack-devel

Now that Rack::Chunked is gracefully a no-op for non-1.1 HTTP
versions, do not cause unnecessary pain for end users upgrading
to Rack 3.
---
 lib/rack/chunked.rb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/rack/chunked.rb b/lib/rack/chunked.rb
index 004163d9..b66f467b 100644
--- a/lib/rack/chunked.rb
+++ b/lib/rack/chunked.rb
@@ -4,8 +4,6 @@ require_relative 'constants'
 require_relative 'utils'
 
 module Rack
-  warn "Rack::Chunked is deprecated and will be removed in Rack 3.1", uplevel: 1
-
   # Middleware that applies chunked transfer encoding to response bodies
   # when the response does not include a content-length header.
   #

-- 

--- 
You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rack-devel/20220901214536.5469-3-e%4080x24.org.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-01 21:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 21:45 [PATCH|PULL 0/2] chunked: limit to HTTP/1.1, undeprecate Eric Wong
2022-09-01 21:45 ` [PATCH 1/2] chunked: limit to HTTP/1.1 Eric Wong
2022-09-01 21:45 ` [PATCH 2/2] chunked: remove deprecation warning Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/rack.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).