You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
36 lines
1.3 KiB
From 62504264cd305533373afe53cc18c6ce098217b8 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
|
|
Date: Sat, 15 Jan 2022 16:09:51 +1300
|
|
Subject: [PATCH 2/2] Remove obsolete support for RFC2109 date/time formatting.
|
|
|
|
---
|
|
lib/rack/utils.rb | 15 ---------------
|
|
1 file changed, 15 deletions(-)
|
|
|
|
diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
|
|
index 2b61298ee..d28a8127a 100644
|
|
--- a/lib/rack/utils.rb
|
|
+++ b/lib/rack/utils.rb
|
|
@@ -317,21 +317,6 @@ def rfc2822(time)
|
|
time.rfc2822
|
|
end
|
|
|
|
- # Modified version of stdlib time.rb Time#rfc2822 to use '%d-%b-%Y' instead
|
|
- # of '% %b %Y'.
|
|
- # It assumes that the time is in GMT to comply to the RFC 2109.
|
|
- #
|
|
- # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough
|
|
- # that I'm certain someone implemented only that option.
|
|
- # Do not use %a and %b from Time.strptime, it would use localized names for
|
|
- # weekday and month.
|
|
- #
|
|
- def rfc2109(time)
|
|
- wday = Time::RFC2822_DAY_NAME[time.wday]
|
|
- mon = Time::RFC2822_MONTH_NAME[time.mon - 1]
|
|
- time.strftime("#{wday}, %d-#{mon}-%Y %H:%M:%S GMT")
|
|
- end
|
|
-
|
|
# Parses the "Range:" header, if present, into an array of Range objects.
|
|
# Returns nil if the header is missing or syntactically invalid.
|
|
# Returns an empty array if none of the ranges are satisfiable.
|