rack 3.0.5 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/rack/response.rb CHANGED
@@ -25,19 +25,11 @@ module Rack
25
25
  self.new(body, status, headers)
26
26
  end
27
27
 
28
- CHUNKED = 'chunked'
29
28
  STATUS_WITH_NO_ENTITY_BODY = Utils::STATUS_WITH_NO_ENTITY_BODY
30
29
 
31
30
  attr_accessor :length, :status, :body
32
31
  attr_reader :headers
33
32
 
34
- # Deprecated, use headers instead.
35
- def header
36
- warn 'Rack::Response#header is deprecated and will be removed in Rack 3.1', uplevel: 1
37
-
38
- headers
39
- end
40
-
41
33
  # Initialize the response object with the specified +body+, +status+
42
34
  # and +headers+.
43
35
  #
@@ -62,7 +54,7 @@ module Rack
62
54
  @status = status.to_i
63
55
 
64
56
  unless headers.is_a?(Hash)
65
- warn "Providing non-hash headers to Rack::Response is deprecated and will be removed in Rack 3.1", uplevel: 1
57
+ raise ArgumentError, "Headers must be a Hash!"
66
58
  end
67
59
 
68
60
  @headers = Headers.new
@@ -97,16 +89,12 @@ module Rack
97
89
  self.status = status
98
90
  self.location = target
99
91
  end
100
-
101
- def chunked?
102
- CHUNKED == get_header(TRANSFER_ENCODING)
103
- end
104
-
92
+
105
93
  def no_entity_body?
106
94
  # The response body is an enumerable body and it is not allowed to have an entity body.
107
95
  @body.respond_to?(:each) && STATUS_WITH_NO_ENTITY_BODY[@status]
108
96
  end
109
-
97
+
110
98
  # Generate a response array consistent with the requirements of the SPEC.
111
99
  # @return [Array] a 3-tuple suitable of `[status, headers, body]`
112
100
  # which is suitable to be returned from the middleware `#call(env)` method.
@@ -117,6 +105,10 @@ module Rack
117
105
  close
118
106
  return [@status, @headers, []]
119
107
  else
108
+ if @length && @length > 0
109
+ set_header CONTENT_LENGTH, @length.to_s
110
+ end
111
+
120
112
  if block_given?
121
113
  @block = block
122
114
  return [@status, @headers, self]
@@ -320,18 +312,26 @@ module Rack
320
312
 
321
313
  protected
322
314
 
315
+ # Convert the body of this response into an internally buffered Array if possible.
316
+ #
317
+ # `@buffered` is a ternary value which indicates whether the body is buffered. It can be:
318
+ # * `nil` - The body has not been buffered yet.
319
+ # * `true` - The body is buffered as an Array instance.
320
+ # * `false` - The body is not buffered and cannot be buffered.
321
+ #
322
+ # @return [Boolean] whether the body is buffered as an Array instance.
323
323
  def buffered_body!
324
324
  if @buffered.nil?
325
325
  if @body.is_a?(Array)
326
326
  # The user supplied body was an array:
327
327
  @body = @body.compact
328
- @body.each do |part|
329
- @length += part.to_s.bytesize
330
- end
328
+ @length = @body.sum{|part| part.bytesize}
329
+ @buffered = true
331
330
  elsif @body.respond_to?(:each)
332
331
  # Turn the user supplied body into a buffered array:
333
332
  body = @body
334
333
  @body = Array.new
334
+ @length = 0
335
335
 
336
336
  body.each do |part|
337
337
  @writer.call(part.to_s)
@@ -339,8 +339,10 @@ module Rack
339
339
 
340
340
  body.close if body.respond_to?(:close)
341
341
 
342
+ # We have converted the body into an Array:
342
343
  @buffered = true
343
344
  else
345
+ # We don't know how to buffer the user-supplied body:
344
346
  @buffered = false
345
347
  end
346
348
  end
@@ -349,12 +351,10 @@ module Rack
349
351
  end
350
352
 
351
353
  def append(chunk)
354
+ chunk = chunk.dup unless chunk.frozen?
352
355
  @body << chunk
353
356
 
354
- unless chunked?
355
- @length += chunk.bytesize
356
- set_header(CONTENT_LENGTH, @length.to_s)
357
- end
357
+ @length += chunk.bytesize
358
358
 
359
359
  return chunk
360
360
  end
data/lib/rack/sendfile.rb CHANGED
@@ -111,7 +111,7 @@ module Rack
111
111
  end
112
112
 
113
113
  def call(env)
114
- status, headers, body = response = @app.call(env)
114
+ _, headers, body = response = @app.call(env)
115
115
 
116
116
  if body.respond_to?(:to_path)
117
117
  case type = variation(env)
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'ostruct'
4
3
  require 'erb'
5
4
 
6
5
  require_relative 'constants'
@@ -19,6 +18,11 @@ module Rack
19
18
  class ShowExceptions
20
19
  CONTEXT = 7
21
20
 
21
+ Frame = Struct.new(:filename, :lineno, :function,
22
+ :pre_context_lineno, :pre_context,
23
+ :context_line, :post_context_lineno,
24
+ :post_context)
25
+
22
26
  def initialize(app)
23
27
  @app = app
24
28
  end
@@ -79,7 +83,7 @@ module Rack
79
83
  # This double assignment is to prevent an "unused variable" warning.
80
84
  # Yes, it is dumb, but I don't like Ruby yelling at me.
81
85
  frames = frames = exception.backtrace.map { |line|
82
- frame = OpenStruct.new
86
+ frame = Frame.new
83
87
  if line =~ /(.*?):(\d+)(:in `(.*)')?/
84
88
  frame.filename = $1
85
89
  frame.lineno = $2.to_i
data/lib/rack/utils.rb CHANGED
@@ -6,6 +6,7 @@ require 'fileutils'
6
6
  require 'set'
7
7
  require 'tempfile'
8
8
  require 'time'
9
+ require 'cgi/escape'
9
10
 
10
11
  require_relative 'query_parser'
11
12
  require_relative 'mime'
@@ -85,15 +86,6 @@ module Rack
85
86
  self.default_query_parser = self.default_query_parser.new_depth_limit(v)
86
87
  end
87
88
 
88
- def self.key_space_limit
89
- warn("`Rack::Utils.key_space_limit` is deprecated as this value no longer has an effect. It will be removed in Rack 3.1", uplevel: 1)
90
- 65536
91
- end
92
-
93
- def self.key_space_limit=(v)
94
- warn("`Rack::Utils.key_space_limit=` is deprecated and no longer has an effect. It will be removed in Rack 3.1", uplevel: 1)
95
- end
96
-
97
89
  if defined?(Process::CLOCK_MONOTONIC)
98
90
  def clock_time
99
91
  Process.clock_gettime(Process::CLOCK_MONOTONIC)
@@ -143,8 +135,8 @@ module Rack
143
135
  end
144
136
 
145
137
  def q_values(q_value_header)
146
- q_value_header.to_s.split(/\s*,\s*/).map do |part|
147
- value, parameters = part.split(/\s*;\s*/, 2)
138
+ q_value_header.to_s.split(',').map do |part|
139
+ value, parameters = part.split(';', 2).map(&:strip)
148
140
  quality = 1.0
149
141
  if parameters && (md = /\Aq=([\d.]+)/.match(parameters))
150
142
  quality = md[1].to_f
@@ -157,9 +149,10 @@ module Rack
157
149
  return nil unless forwarded_header
158
150
  forwarded_header = forwarded_header.to_s.gsub("\n", ";")
159
151
 
160
- forwarded_header.split(/\s*;\s*/).each_with_object({}) do |field, values|
161
- field.split(/\s*,\s*/).each do |pair|
162
- return nil unless pair =~ /\A\s*(by|for|host|proto)\s*=\s*"?([^"]+)"?\s*\Z/i
152
+ forwarded_header.split(';').each_with_object({}) do |field, values|
153
+ field.split(',').each do |pair|
154
+ pair = pair.split('=').map(&:strip).join('=')
155
+ return nil unless pair =~ /\A(by|for|host|proto)="?([^"]+)"?\Z/i
163
156
  (values[$1.downcase.to_sym] ||= []) << $2
164
157
  end
165
158
  end
@@ -183,21 +176,8 @@ module Rack
183
176
  matches&.first
184
177
  end
185
178
 
186
- ESCAPE_HTML = {
187
- "&" => "&amp;",
188
- "<" => "&lt;",
189
- ">" => "&gt;",
190
- "'" => "&#x27;",
191
- '"' => "&quot;",
192
- "/" => "&#x2F;"
193
- }
194
-
195
- ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)
196
-
197
179
  # Escape ampersands, brackets and quotes to their HTML/XML entities.
198
- def escape_html(string)
199
- string.to_s.gsub(ESCAPE_HTML_PATTERN){|c| ESCAPE_HTML[c] }
200
- end
180
+ define_method(:escape_html, CGI.method(:escapeHTML))
201
181
 
202
182
  def select_best_encoding(available_encodings, accept_encoding)
203
183
  # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
@@ -251,21 +231,6 @@ module Rack
251
231
  end
252
232
  end
253
233
 
254
- def add_cookie_to_header(header, key, value)
255
- warn("add_cookie_to_header is deprecated and will be removed in Rack 3.1", uplevel: 1)
256
-
257
- case header
258
- when nil, ''
259
- return set_cookie_header(key, value)
260
- when String
261
- [header, set_cookie_header(key, value)]
262
- when Array
263
- header + [set_cookie_header(key, value)]
264
- else
265
- raise ArgumentError, "Unrecognized cookie header value. Expected String, Array, or nil, got #{header.inspect}"
266
- end
267
- end
268
-
269
234
  # :call-seq:
270
235
  # parse_cookies(env) -> hash
271
236
  #
@@ -279,6 +244,20 @@ module Rack
279
244
  parse_cookies_header env[HTTP_COOKIE]
280
245
  end
281
246
 
247
+ # A valid cookie key according to RFC2616.
248
+ # A <cookie-name> can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }.
249
+ VALID_COOKIE_KEY = /\A[!#$%&'*+\-\.\^_`|~0-9a-zA-Z]+\z/.freeze
250
+ private_constant :VALID_COOKIE_KEY
251
+
252
+ private def escape_cookie_key(key)
253
+ if key =~ VALID_COOKIE_KEY
254
+ key
255
+ else
256
+ warn "Cookie key #{key.inspect} is not valid according to RFC2616; it will be escaped. This behaviour is deprecated and will be removed in a future version of Rack.", uplevel: 2
257
+ escape(key)
258
+ end
259
+ end
260
+
282
261
  # :call-seq:
283
262
  # set_cookie_header(key, value) -> encoded string
284
263
  #
@@ -305,7 +284,7 @@ module Rack
305
284
  def set_cookie_header(key, value)
306
285
  case value
307
286
  when Hash
308
- key = escape(key) unless value[:escape_key] == false
287
+ key = escape_cookie_key(key) unless value[:escape_key] == false
309
288
  domain = "; domain=#{value[:domain]}" if value[:domain]
310
289
  path = "; path=#{value[:path]}" if value[:path]
311
290
  max_age = "; max-age=#{value[:max_age]}" if value[:max_age]
@@ -317,23 +296,24 @@ module Rack
317
296
  when false, nil
318
297
  nil
319
298
  when :none, 'None', :None
320
- '; SameSite=None'
299
+ '; samesite=none'
321
300
  when :lax, 'Lax', :Lax
322
- '; SameSite=Lax'
301
+ '; samesite=lax'
323
302
  when true, :strict, 'Strict', :Strict
324
- '; SameSite=Strict'
303
+ '; samesite=strict'
325
304
  else
326
- raise ArgumentError, "Invalid SameSite value: #{value[:same_site].inspect}"
305
+ raise ArgumentError, "Invalid :same_site value: #{value[:same_site].inspect}"
327
306
  end
307
+ partitioned = "; partitioned" if value[:partitioned]
328
308
  value = value[:value]
329
309
  else
330
- key = escape(key)
310
+ key = escape_cookie_key(key)
331
311
  end
332
312
 
333
313
  value = [value] unless Array === value
334
314
 
335
315
  return "#{key}=#{value.map { |v| escape v }.join('&')}#{domain}" \
336
- "#{path}#{max_age}#{expires}#{secure}#{httponly}#{same_site}"
316
+ "#{path}#{max_age}#{expires}#{secure}#{httponly}#{same_site}#{partitioned}"
337
317
  end
338
318
 
339
319
  # :call-seq:
@@ -374,24 +354,12 @@ module Rack
374
354
  set_cookie_header(key, value.merge(max_age: '0', expires: Time.at(0), value: ''))
375
355
  end
376
356
 
377
- def make_delete_cookie_header(header, key, value)
378
- warn("make_delete_cookie_header is deprecated and will be removed in Rack 3.1, use delete_set_cookie_header! instead", uplevel: 1)
379
-
380
- delete_set_cookie_header!(header, key, value)
381
- end
382
-
383
357
  def delete_cookie_header!(headers, key, value = {})
384
358
  headers[SET_COOKIE] = delete_set_cookie_header!(headers[SET_COOKIE], key, value)
385
359
 
386
360
  return nil
387
361
  end
388
362
 
389
- def add_remove_cookie_to_header(header, key, value = {})
390
- warn("add_remove_cookie_to_header is deprecated and will be removed in Rack 3.1, use delete_set_cookie_header! instead", uplevel: 1)
391
-
392
- delete_set_cookie_header!(header, key, value)
393
- end
394
-
395
363
  # :call-seq:
396
364
  # delete_set_cookie_header!(header, key, value = {}) -> header value
397
365
  #
@@ -434,6 +402,8 @@ module Rack
434
402
 
435
403
  def get_byte_ranges(http_range, size)
436
404
  # See <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>
405
+ # Ignore Range when file size is 0 to avoid a 416 error.
406
+ return nil if size.zero?
437
407
  return nil unless http_range && http_range =~ /bytes=([^;]+)/
438
408
  ranges = []
439
409
  $1.split(/,\s*/).each do |range_spec|
@@ -458,6 +428,9 @@ module Rack
458
428
  end
459
429
  ranges << (r0..r1) if r0 <= r1
460
430
  end
431
+
432
+ return [] if ranges.map(&:size).sum > size
433
+
461
434
  ranges
462
435
  end
463
436
 
@@ -513,39 +486,12 @@ module Rack
513
486
  end
514
487
  end
515
488
 
516
- # A wrapper around Headers
517
- # header when set.
518
- #
519
- # @api private
520
- class HeaderHash < Hash # :nodoc:
521
- def self.[](headers)
522
- warn "Rack::Utils::HeaderHash is deprecated and will be removed in Rack 3.1, switch to Rack::Headers", uplevel: 1
523
- if headers.is_a?(Headers) && !headers.frozen?
524
- return headers
525
- end
526
-
527
- new_headers = Headers.new
528
- headers.each{|k,v| new_headers[k] = v}
529
- new_headers
530
- end
531
-
532
- def self.new(hash = {})
533
- warn "Rack::Utils::HeaderHash is deprecated and will be removed in Rack 3.1, switch to Rack::Headers", uplevel: 1
534
- headers = Headers.new
535
- hash.each{|k,v| headers[k] = v}
536
- headers
537
- end
538
-
539
- def self.allocate
540
- raise TypeError, "cannot allocate HeaderHash"
541
- end
542
- end
543
-
544
489
  # Every standard HTTP code mapped to the appropriate message.
545
490
  # Generated with:
546
- # curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \
547
- # ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
548
- # puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
491
+ # curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv \
492
+ # | ruby -rcsv -e "puts CSV.parse(STDIN, headers: true) \
493
+ # .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \
494
+ # .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)"
549
495
  HTTP_STATUS_CODES = {
550
496
  100 => 'Continue',
551
497
  101 => 'Switching Protocols',
@@ -567,7 +513,6 @@ module Rack
567
513
  303 => 'See Other',
568
514
  304 => 'Not Modified',
569
515
  305 => 'Use Proxy',
570
- 306 => '(Unused)',
571
516
  307 => 'Temporary Redirect',
572
517
  308 => 'Permanent Redirect',
573
518
  400 => 'Bad Request',
@@ -583,13 +528,13 @@ module Rack
583
528
  410 => 'Gone',
584
529
  411 => 'Length Required',
585
530
  412 => 'Precondition Failed',
586
- 413 => 'Payload Too Large',
531
+ 413 => 'Content Too Large',
587
532
  414 => 'URI Too Long',
588
533
  415 => 'Unsupported Media Type',
589
534
  416 => 'Range Not Satisfiable',
590
535
  417 => 'Expectation Failed',
591
536
  421 => 'Misdirected Request',
592
- 422 => 'Unprocessable Entity',
537
+ 422 => 'Unprocessable Content',
593
538
  423 => 'Locked',
594
539
  424 => 'Failed Dependency',
595
540
  425 => 'Too Early',
@@ -597,7 +542,7 @@ module Rack
597
542
  428 => 'Precondition Required',
598
543
  429 => 'Too Many Requests',
599
544
  431 => 'Request Header Fields Too Large',
600
- 451 => 'Unavailable for Legal Reasons',
545
+ 451 => 'Unavailable For Legal Reasons',
601
546
  500 => 'Internal Server Error',
602
547
  501 => 'Not Implemented',
603
548
  502 => 'Bad Gateway',
@@ -607,8 +552,6 @@ module Rack
607
552
  506 => 'Variant Also Negotiates',
608
553
  507 => 'Insufficient Storage',
609
554
  508 => 'Loop Detected',
610
- 509 => 'Bandwidth Limit Exceeded',
611
- 510 => 'Not Extended',
612
555
  511 => 'Network Authentication Required'
613
556
  }
614
557
 
@@ -616,12 +559,34 @@ module Rack
616
559
  STATUS_WITH_NO_ENTITY_BODY = Hash[((100..199).to_a << 204 << 304).product([true])]
617
560
 
618
561
  SYMBOL_TO_STATUS_CODE = Hash[*HTTP_STATUS_CODES.map { |code, message|
619
- [message.downcase.gsub(/\s|-|'/, '_').to_sym, code]
562
+ [message.downcase.gsub(/\s|-/, '_').to_sym, code]
620
563
  }.flatten]
621
564
 
565
+ OBSOLETE_SYMBOLS_TO_STATUS_CODES = {
566
+ payload_too_large: 413,
567
+ unprocessable_entity: 422,
568
+ bandwidth_limit_exceeded: 509,
569
+ not_extended: 510
570
+ }.freeze
571
+ private_constant :OBSOLETE_SYMBOLS_TO_STATUS_CODES
572
+
573
+ OBSOLETE_SYMBOL_MAPPINGS = {
574
+ payload_too_large: :content_too_large,
575
+ unprocessable_entity: :unprocessable_content
576
+ }.freeze
577
+ private_constant :OBSOLETE_SYMBOL_MAPPINGS
578
+
622
579
  def status_code(status)
623
580
  if status.is_a?(Symbol)
624
- SYMBOL_TO_STATUS_CODE.fetch(status) { raise ArgumentError, "Unrecognized status code #{status.inspect}" }
581
+ SYMBOL_TO_STATUS_CODE.fetch(status) do
582
+ fallback_code = OBSOLETE_SYMBOLS_TO_STATUS_CODES.fetch(status) { raise ArgumentError, "Unrecognized status code #{status.inspect}" }
583
+ message = "Status code #{status.inspect} is deprecated and will be removed in a future version of Rack."
584
+ if canonical_symbol = OBSOLETE_SYMBOL_MAPPINGS[status]
585
+ message = "#{message} Please use #{canonical_symbol.inspect} instead."
586
+ end
587
+ warn message, uplevel: 1
588
+ fallback_code
589
+ end
625
590
  else
626
591
  status.to_i
627
592
  end
data/lib/rack/version.rb CHANGED
@@ -12,20 +12,7 @@
12
12
  # so it should be enough just to <tt>require 'rack'</tt> in your code.
13
13
 
14
14
  module Rack
15
- # The Rack protocol version number implemented.
16
- VERSION = [1, 3].freeze
17
- deprecate_constant :VERSION
18
-
19
- VERSION_STRING = "1.3".freeze
20
- deprecate_constant :VERSION_STRING
21
-
22
- # The Rack protocol version number implemented.
23
- def self.version
24
- warn "Rack.version is deprecated and will be removed in Rack 3.1!", uplevel: 1
25
- VERSION
26
- end
27
-
28
- RELEASE = "3.0.5"
15
+ RELEASE = "3.1.0"
29
16
 
30
17
  # Return the Rack release as a dotted string.
31
18
  def self.release
data/lib/rack.rb CHANGED
@@ -15,23 +15,21 @@ require_relative 'rack/version'
15
15
  require_relative 'rack/constants'
16
16
 
17
17
  module Rack
18
- autoload :Builder, "rack/builder"
18
+ autoload :BadRequest, "rack/bad_request"
19
19
  autoload :BodyProxy, "rack/body_proxy"
20
+ autoload :Builder, "rack/builder"
20
21
  autoload :Cascade, "rack/cascade"
21
- autoload :Chunked, "rack/chunked"
22
22
  autoload :CommonLogger, "rack/common_logger"
23
23
  autoload :ConditionalGet, "rack/conditional_get"
24
24
  autoload :Config, "rack/config"
25
25
  autoload :ContentLength, "rack/content_length"
26
26
  autoload :ContentType, "rack/content_type"
27
+ autoload :Deflater, "rack/deflater"
28
+ autoload :Directory, "rack/directory"
27
29
  autoload :ETag, "rack/etag"
28
30
  autoload :Events, "rack/events"
29
- autoload :File, "rack/file"
30
31
  autoload :Files, "rack/files"
31
- autoload :Deflater, "rack/deflater"
32
- autoload :Directory, "rack/directory"
33
32
  autoload :ForwardRequest, "rack/recursive"
34
- autoload :Handler, "rack/handler"
35
33
  autoload :Head, "rack/head"
36
34
  autoload :Headers, "rack/headers"
37
35
  autoload :Lint, "rack/lint"
@@ -40,31 +38,28 @@ module Rack
40
38
  autoload :MediaType, "rack/media_type"
41
39
  autoload :MethodOverride, "rack/method_override"
42
40
  autoload :Mime, "rack/mime"
41
+ autoload :MockRequest, "rack/mock_request"
42
+ autoload :MockResponse, "rack/mock_response"
43
+ autoload :Multipart, "rack/multipart"
43
44
  autoload :NullLogger, "rack/null_logger"
45
+ autoload :QueryParser, "rack/query_parser"
44
46
  autoload :Recursive, "rack/recursive"
45
47
  autoload :Reloader, "rack/reloader"
48
+ autoload :Request, "rack/request"
49
+ autoload :Response, "rack/response"
46
50
  autoload :RewindableInput, "rack/rewindable_input"
47
51
  autoload :Runtime, "rack/runtime"
48
52
  autoload :Sendfile, "rack/sendfile"
49
- autoload :Server, "rack/server"
50
53
  autoload :ShowExceptions, "rack/show_exceptions"
51
54
  autoload :ShowStatus, "rack/show_status"
52
55
  autoload :Static, "rack/static"
53
56
  autoload :TempfileReaper, "rack/tempfile_reaper"
54
57
  autoload :URLMap, "rack/urlmap"
55
58
  autoload :Utils, "rack/utils"
56
- autoload :Multipart, "rack/multipart"
57
-
58
- autoload :MockRequest, "rack/mock_request"
59
- autoload :MockResponse, "rack/mock_response"
60
-
61
- autoload :Request, "rack/request"
62
- autoload :Response, "rack/response"
63
59
 
64
60
  module Auth
65
61
  autoload :Basic, "rack/auth/basic"
66
- autoload :AbstractRequest, "rack/auth/abstract/request"
67
62
  autoload :AbstractHandler, "rack/auth/abstract/handler"
68
- autoload :Digest, "rack/auth/digest"
63
+ autoload :AbstractRequest, "rack/auth/abstract/request"
69
64
  end
70
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-12 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -89,15 +89,10 @@ files:
89
89
  - lib/rack/auth/abstract/handler.rb
90
90
  - lib/rack/auth/abstract/request.rb
91
91
  - lib/rack/auth/basic.rb
92
- - lib/rack/auth/digest.rb
93
- - lib/rack/auth/digest/md5.rb
94
- - lib/rack/auth/digest/nonce.rb
95
- - lib/rack/auth/digest/params.rb
96
- - lib/rack/auth/digest/request.rb
92
+ - lib/rack/bad_request.rb
97
93
  - lib/rack/body_proxy.rb
98
94
  - lib/rack/builder.rb
99
95
  - lib/rack/cascade.rb
100
- - lib/rack/chunked.rb
101
96
  - lib/rack/common_logger.rb
102
97
  - lib/rack/conditional_get.rb
103
98
  - lib/rack/config.rb
@@ -108,7 +103,6 @@ files:
108
103
  - lib/rack/directory.rb
109
104
  - lib/rack/etag.rb
110
105
  - lib/rack/events.rb
111
- - lib/rack/file.rb
112
106
  - lib/rack/files.rb
113
107
  - lib/rack/head.rb
114
108
  - lib/rack/headers.rb
@@ -164,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
158
  - !ruby/object:Gem::Version
165
159
  version: '0'
166
160
  requirements: []
167
- rubygems_version: 3.4.6
161
+ rubygems_version: 3.5.9
168
162
  signing_key:
169
163
  specification_version: 4
170
164
  summary: A modular Ruby webserver interface.
@@ -1 +0,0 @@
1
- require_relative '../digest'
@@ -1 +0,0 @@
1
- require_relative '../digest'
@@ -1 +0,0 @@
1
- require_relative '../digest'
@@ -1 +0,0 @@
1
- require_relative '../digest'