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: SPEC.rdoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The remainder of the request URL's "path", designating the virtual "location" of
34
34
35
35
The <tt>PATH_INFO</tt>, if provided, must be a valid request target or an empty string, as defined by {RFC9110}[https://datatracker.ietf.org/doc/html/rfc9110#target.resource].
36
36
* Only <tt>OPTIONS</tt> requests may have <tt>PATH_INFO</tt> set to <tt>*</tt> (asterisk-form).
37
-
* Only <tt>CONNECT</tt> requests may have <tt>PATH_INFO</tt> set to an authority (authority-form). Note that in HTTP/2+, the authority-form is not a valid request target.
37
+
* Only <tt>CONNECT</tt> requests may have <tt>PATH_INFO</tt> set to an authority (authority-form). Note that in <tt>HTTP/2+</tt>, the authority-form is not a valid request target.
38
38
* <tt>CONNECT</tt> and <tt>OPTIONS</tt> requests must not have <tt>PATH_INFO</tt> set to a URI (absolute-form).
39
39
* Otherwise, <tt>PATH_INFO</tt> must start with a <tt>/</tt> and must not include a fragment part starting with <tt>#</tt> (origin-form).
40
40
@@ -149,8 +149,8 @@ The input stream is an +IO+-like object which contains the raw HTTP request data
149
149
* +read+ behaves like <tt>IO#read</tt>. Its signature is <tt>read([length, [buffer]])</tt>.
150
150
* If given, +length+ must be a non-negative Integer (>= 0) or +nil+, and +buffer+ must be a +String+ and may not be +nil+.
151
151
* If +length+ is given and not +nil+, then this method reads at most +length+ bytes from the input stream.
152
-
* If +length+ is not given or +nil+, then this method reads all data until <tt>EOF</tt>.
153
-
* When <tt>EOF</tt> is reached, this method returns +nil+ if +length+ is given and not +nil+, or +""+ if +length+ is not given or is +nil+.
152
+
* If +length+ is not given or +nil+, then this method reads all data until EOF.
153
+
* When EOF is reached, this method returns +nil+ if +length+ is given and not +nil+, or +""+ if +length+ is not given or is +nil+.
154
154
* If +buffer+ is given, then the read data will be placed into +buffer+ instead of a newly created +String+.
155
155
* +each+ must be called without arguments and only yield +String+ values.
156
156
* +close+ can be called on the input stream to indicate that any remaining input is not needed.
@@ -205,9 +205,9 @@ This is an HTTP status. It must be an Integer greater than or equal to 100.
205
205
The headers must be an unfrozen +Hash+. The header keys must be +String+ values. Special headers starting <tt>rack.</tt> are for communicating with the server, and must not be sent back to the client.
206
206
207
207
* The headers must not contain a <tt>"status"</tt> key.
208
-
* Header keys must conform to {RFC7230}[https://tools.ietf.org/html/rfc7230] token specification, i.e. cannot contain non-printable ASCII, <tt>DQUOTE</tt> or <tt>(),/:;<=>?@[\]{}</tt>.
208
+
* Header keys must conform to {RFC7230}[https://tools.ietf.org/html/rfc7230] token specification, i.e. cannot contain non-printable <tt>ASCII</tt>, <tt>DQUOTE</tt> or <tt>(),/:;<=>?@[\]{}</tt>.
209
209
* Header keys must not contain uppercase <tt>ASCII</tt> characters (A-Z).
210
-
* Header values must be either a +String+, or an +Array+ of +String+ values, such that each +String+ must not contain characters with an ASCII ordinal below 040 (32).
210
+
* Header values must be either a +String+, or an +Array+ of +String+ values, such that each +String+ must not contain characters with an <tt>ASCII</tt> ordinal below <tt>040</tt> (32).
211
211
212
212
==== The <tt>content-type</tt> Header
213
213
@@ -225,7 +225,7 @@ Setting this value informs the server that it should perform a connection upgrad
225
225
226
226
=== The Body
227
227
228
-
The Body is typically an +Array+ of +String+ values, an enumerable that yields +String+ values, a +Proc+, or a +File+-like object.
228
+
The Body is typically an +Array+ of +String+ values, an enumerable that yields +String+ values, a +Proc+, or an +IO+-like object.
229
229
230
230
The Body must respond to +each+ or +call+. It may optionally respond to +to_path+ or +to_ary+. A Body that responds to +each+ is considered to be an Enumerable Body. A Body that responds to +call+ is considered to be a Streaming Body.
Copy file name to clipboardExpand all lines: lib/rack/lint.rb
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,6 @@ def call(env = nil)
55
55
56
56
# N.B. The empty `##` comments creates paragraphs in the output. A trailing "\" is used to escape the newline character, which combines the comments into a single paragraph.
# - Use + for: Ruby types, concepts, method names, class references.
61
-
#
62
58
## = Rack Specification
63
59
##
64
60
## This specification aims to formalize the Rack protocol. You can (and should) use +Rack::Lint+ to enforce it. When you develop middleware, be sure to test with +Rack::Lint+ to catch possible violations of this specification.
@@ -222,7 +218,7 @@ def check_environment(env)
222
218
raiseLintError,"Only CONNECT requests may have PATH_INFO set to an authority (authority-form)"
223
219
end
224
220
whenREQUEST_PATH_ABSOLUTE_FORM
225
-
## * <tt>CONNECT</tt> and <tt>OPTIONS</tt> requests must not have <tt>PATH_INFO</tt> set to a <tt>URI</tt> (absolute-form).
221
+
## * <tt>CONNECT</tt> and <tt>OPTIONS</tt> requests must not have <tt>PATH_INFO</tt> set to a URI (absolute-form).
0 commit comments