rack 1.1.6 → 1.6.9
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.
- checksums.yaml +7 -0
- data/COPYING +1 -1
- data/HISTORY.md +375 -0
- data/KNOWN-ISSUES +23 -0
- data/README.rdoc +312 -0
- data/Rakefile +124 -0
- data/SPEC +125 -32
- data/contrib/rack.png +0 -0
- data/contrib/rack.svg +150 -0
- data/contrib/rack_logo.svg +1 -1
- data/contrib/rdoc.css +412 -0
- data/example/protectedlobster.rb +1 -1
- data/lib/rack/auth/abstract/handler.rb +4 -4
- data/lib/rack/auth/abstract/request.rb +7 -5
- data/lib/rack/auth/basic.rb +1 -1
- data/lib/rack/auth/digest/md5.rb +7 -3
- data/lib/rack/auth/digest/nonce.rb +1 -1
- data/lib/rack/auth/digest/params.rb +7 -9
- data/lib/rack/auth/digest/request.rb +10 -9
- data/lib/rack/backports/uri/common_18.rb +56 -0
- data/lib/rack/backports/uri/common_192.rb +52 -0
- data/lib/rack/backports/uri/common_193.rb +29 -0
- data/lib/rack/body_proxy.rb +39 -0
- data/lib/rack/builder.rb +106 -22
- data/lib/rack/cascade.rb +17 -6
- data/lib/rack/chunked.rb +44 -24
- data/lib/rack/commonlogger.rb +36 -13
- data/lib/rack/conditionalget.rb +49 -17
- data/lib/rack/config.rb +5 -0
- data/lib/rack/content_length.rb +14 -6
- data/lib/rack/content_type.rb +7 -1
- data/lib/rack/deflater.rb +73 -15
- data/lib/rack/directory.rb +18 -8
- data/lib/rack/etag.rb +59 -9
- data/lib/rack/file.rb +106 -44
- data/lib/rack/handler/cgi.rb +11 -11
- data/lib/rack/handler/fastcgi.rb +18 -6
- data/lib/rack/handler/lsws.rb +2 -4
- data/lib/rack/handler/mongrel.rb +22 -6
- data/lib/rack/handler/scgi.rb +16 -8
- data/lib/rack/handler/thin.rb +19 -4
- data/lib/rack/handler/webrick.rb +72 -19
- data/lib/rack/handler.rb +47 -14
- data/lib/rack/head.rb +10 -2
- data/lib/rack/lint.rb +260 -75
- data/lib/rack/lobster.rb +13 -8
- data/lib/rack/lock.rb +13 -3
- data/lib/rack/logger.rb +0 -2
- data/lib/rack/methodoverride.rb +27 -8
- data/lib/rack/mime.rb +625 -167
- data/lib/rack/mock.rb +78 -53
- data/lib/rack/multipart/generator.rb +93 -0
- data/lib/rack/multipart/parser.rb +253 -0
- data/lib/rack/multipart/uploaded_file.rb +34 -0
- data/lib/rack/multipart.rb +34 -0
- data/lib/rack/nulllogger.rb +21 -2
- data/lib/rack/recursive.rb +10 -5
- data/lib/rack/reloader.rb +3 -2
- data/lib/rack/request.rb +201 -74
- data/lib/rack/response.rb +41 -28
- data/lib/rack/rewindable_input.rb +15 -11
- data/lib/rack/runtime.rb +16 -3
- data/lib/rack/sendfile.rb +47 -29
- data/lib/rack/server.rb +223 -47
- data/lib/rack/session/abstract/id.rb +289 -30
- data/lib/rack/session/cookie.rb +133 -44
- data/lib/rack/session/memcache.rb +30 -56
- data/lib/rack/session/pool.rb +19 -43
- data/lib/rack/showexceptions.rb +53 -15
- data/lib/rack/showstatus.rb +14 -7
- data/lib/rack/static.rb +124 -12
- data/lib/rack/tempfile_reaper.rb +22 -0
- data/lib/rack/urlmap.rb +49 -15
- data/lib/rack/utils/okjson.rb +600 -0
- data/lib/rack/utils.rb +363 -361
- data/lib/rack.rb +17 -23
- data/rack.gemspec +11 -20
- data/test/builder/anything.rb +5 -0
- data/test/builder/comment.ru +4 -0
- data/test/builder/end.ru +5 -0
- data/test/builder/line.ru +1 -0
- data/test/builder/options.ru +2 -0
- data/test/cgi/assets/folder/test.js +1 -0
- data/test/cgi/assets/fonts/font.eot +1 -0
- data/test/cgi/assets/images/image.png +1 -0
- data/test/cgi/assets/index.html +1 -0
- data/test/cgi/assets/javascripts/app.js +1 -0
- data/test/cgi/assets/stylesheets/app.css +1 -0
- data/test/cgi/lighttpd.conf +26 -0
- data/test/cgi/rackup_stub.rb +6 -0
- data/test/cgi/sample_rackup.ru +5 -0
- data/test/cgi/test +9 -0
- data/test/cgi/test+directory/test+file +1 -0
- data/test/cgi/test.fcgi +8 -0
- data/test/cgi/test.ru +5 -0
- data/test/gemloader.rb +10 -0
- data/test/multipart/bad_robots +259 -0
- data/test/multipart/binary +0 -0
- data/test/multipart/content_type_and_no_filename +6 -0
- data/test/multipart/empty +10 -0
- data/test/multipart/fail_16384_nofile +814 -0
- data/test/multipart/file1.txt +1 -0
- data/test/multipart/filename_and_modification_param +7 -0
- data/test/multipart/filename_and_no_name +6 -0
- data/test/multipart/filename_with_escaped_quotes +6 -0
- data/test/multipart/filename_with_escaped_quotes_and_modification_param +7 -0
- data/test/multipart/filename_with_null_byte +7 -0
- data/test/multipart/filename_with_percent_escaped_quotes +6 -0
- data/test/multipart/filename_with_unescaped_percentages +6 -0
- data/test/multipart/filename_with_unescaped_percentages2 +6 -0
- data/test/multipart/filename_with_unescaped_percentages3 +6 -0
- data/test/multipart/filename_with_unescaped_quotes +6 -0
- data/test/multipart/ie +6 -0
- data/test/multipart/invalid_character +6 -0
- data/test/multipart/mixed_files +21 -0
- data/test/multipart/nested +10 -0
- data/test/multipart/none +9 -0
- data/test/multipart/semicolon +6 -0
- data/test/multipart/text +15 -0
- data/test/multipart/three_files_three_fields +31 -0
- data/test/multipart/webkit +32 -0
- data/test/rackup/config.ru +31 -0
- data/test/registering_handler/rack/handler/registering_myself.rb +8 -0
- data/test/{spec_rack_auth_basic.rb → spec_auth_basic.rb} +23 -15
- data/test/{spec_rack_auth_digest.rb → spec_auth_digest.rb} +56 -29
- data/test/spec_body_proxy.rb +85 -0
- data/test/spec_builder.rb +223 -0
- data/test/{spec_rack_cascade.rb → spec_cascade.rb} +28 -15
- data/test/{spec_rack_cgi.rb → spec_cgi.rb} +44 -31
- data/test/spec_chunked.rb +101 -0
- data/test/spec_commonlogger.rb +93 -0
- data/test/spec_conditionalget.rb +102 -0
- data/test/{spec_rack_config.rb → spec_config.rb} +6 -8
- data/test/spec_content_length.rb +85 -0
- data/test/spec_content_type.rb +45 -0
- data/test/spec_deflater.rb +339 -0
- data/test/{spec_rack_directory.rb → spec_directory.rb} +37 -10
- data/test/spec_etag.rb +107 -0
- data/test/{spec_rack_fastcgi.rb → spec_fastcgi.rb} +47 -29
- data/test/spec_file.rb +221 -0
- data/test/spec_handler.rb +72 -0
- data/test/spec_head.rb +45 -0
- data/test/{spec_rack_lint.rb → spec_lint.rb} +82 -60
- data/test/spec_lobster.rb +58 -0
- data/test/spec_lock.rb +164 -0
- data/test/spec_logger.rb +23 -0
- data/test/spec_methodoverride.rb +95 -0
- data/test/spec_mime.rb +51 -0
- data/test/{spec_rack_mock.rb → spec_mock.rb} +92 -38
- data/test/{spec_rack_mongrel.rb → spec_mongrel.rb} +46 -53
- data/test/spec_multipart.rb +600 -0
- data/test/spec_nulllogger.rb +20 -0
- data/test/spec_recursive.rb +72 -0
- data/test/spec_request.rb +1227 -0
- data/test/spec_response.rb +407 -0
- data/test/spec_rewindable_input.rb +118 -0
- data/test/spec_runtime.rb +49 -0
- data/test/spec_sendfile.rb +130 -0
- data/test/spec_server.rb +167 -0
- data/test/spec_session_abstract_id.rb +53 -0
- data/test/spec_session_cookie.rb +410 -0
- data/test/{spec_rack_session_memcache.rb → spec_session_memcache.rb} +119 -71
- data/test/{spec_rack_session_pool.rb → spec_session_pool.rb} +106 -69
- data/test/spec_showexceptions.rb +85 -0
- data/test/spec_showstatus.rb +103 -0
- data/test/spec_static.rb +145 -0
- data/test/spec_tempfile_reaper.rb +63 -0
- data/test/{spec_rack_thin.rb → spec_thin.rb} +35 -35
- data/test/{spec_rack_urlmap.rb → spec_urlmap.rb} +40 -19
- data/test/spec_utils.rb +647 -0
- data/test/spec_version.rb +17 -0
- data/test/spec_webrick.rb +184 -0
- data/test/static/another/index.html +1 -0
- data/test/static/index.html +1 -0
- data/test/testrequest.rb +78 -0
- data/test/unregistered_handler/rack/handler/unregistered.rb +7 -0
- data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +7 -0
- metadata +220 -239
- data/RDOX +0 -0
- data/README +0 -592
- data/lib/rack/adapter/camping.rb +0 -22
- data/test/spec_auth.rb +0 -57
- data/test/spec_rack_builder.rb +0 -84
- data/test/spec_rack_camping.rb +0 -55
- data/test/spec_rack_chunked.rb +0 -62
- data/test/spec_rack_commonlogger.rb +0 -61
- data/test/spec_rack_conditionalget.rb +0 -41
- data/test/spec_rack_content_length.rb +0 -43
- data/test/spec_rack_content_type.rb +0 -30
- data/test/spec_rack_deflater.rb +0 -127
- data/test/spec_rack_etag.rb +0 -17
- data/test/spec_rack_file.rb +0 -75
- data/test/spec_rack_handler.rb +0 -43
- data/test/spec_rack_head.rb +0 -30
- data/test/spec_rack_lobster.rb +0 -45
- data/test/spec_rack_lock.rb +0 -38
- data/test/spec_rack_logger.rb +0 -21
- data/test/spec_rack_methodoverride.rb +0 -60
- data/test/spec_rack_nulllogger.rb +0 -13
- data/test/spec_rack_recursive.rb +0 -77
- data/test/spec_rack_request.rb +0 -594
- data/test/spec_rack_response.rb +0 -221
- data/test/spec_rack_rewindable_input.rb +0 -118
- data/test/spec_rack_runtime.rb +0 -35
- data/test/spec_rack_sendfile.rb +0 -86
- data/test/spec_rack_session_cookie.rb +0 -92
- data/test/spec_rack_showexceptions.rb +0 -21
- data/test/spec_rack_showstatus.rb +0 -72
- data/test/spec_rack_static.rb +0 -37
- data/test/spec_rack_utils.rb +0 -557
- data/test/spec_rack_webrick.rb +0 -130
- data/test/spec_rackup.rb +0 -164
data/contrib/rack.svg
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
|
6
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
7
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
8
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
9
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
+
width="744.09448819"
|
|
14
|
+
height="1052.3622047"
|
|
15
|
+
id="svg2"
|
|
16
|
+
version="1.1"
|
|
17
|
+
inkscape:version="0.48.3.1 r9886"
|
|
18
|
+
sodipodi:docname="rack.svg">
|
|
19
|
+
<defs
|
|
20
|
+
id="defs4">
|
|
21
|
+
<linearGradient
|
|
22
|
+
id="linearGradient3837"
|
|
23
|
+
osb:paint="solid">
|
|
24
|
+
<stop
|
|
25
|
+
style="stop-color:#000000;stop-opacity:1;"
|
|
26
|
+
offset="0"
|
|
27
|
+
id="stop3839" />
|
|
28
|
+
</linearGradient>
|
|
29
|
+
</defs>
|
|
30
|
+
<sodipodi:namedview
|
|
31
|
+
id="base"
|
|
32
|
+
pagecolor="#ffffff"
|
|
33
|
+
bordercolor="#666666"
|
|
34
|
+
borderopacity="1.0"
|
|
35
|
+
inkscape:pageopacity="0.0"
|
|
36
|
+
inkscape:pageshadow="2"
|
|
37
|
+
inkscape:zoom="0.98994949"
|
|
38
|
+
inkscape:cx="230.49849"
|
|
39
|
+
inkscape:cy="656.46253"
|
|
40
|
+
inkscape:document-units="px"
|
|
41
|
+
inkscape:current-layer="layer1"
|
|
42
|
+
showgrid="false"
|
|
43
|
+
showguides="false"
|
|
44
|
+
inkscape:guide-bbox="true"
|
|
45
|
+
inkscape:window-width="1920"
|
|
46
|
+
inkscape:window-height="1056"
|
|
47
|
+
inkscape:window-x="1920"
|
|
48
|
+
inkscape:window-y="24"
|
|
49
|
+
inkscape:window-maximized="1">
|
|
50
|
+
<sodipodi:guide
|
|
51
|
+
orientation="1,0"
|
|
52
|
+
position="645.99255,757.10933"
|
|
53
|
+
id="guide2995" />
|
|
54
|
+
<sodipodi:guide
|
|
55
|
+
orientation="1,0"
|
|
56
|
+
position="488.40876,686.90373"
|
|
57
|
+
id="guide2997" />
|
|
58
|
+
<sodipodi:guide
|
|
59
|
+
orientation="1,0"
|
|
60
|
+
position="176.7767,748.52304"
|
|
61
|
+
id="guide2999" />
|
|
62
|
+
<sodipodi:guide
|
|
63
|
+
orientation="1,0"
|
|
64
|
+
position="355.71429,782.85714"
|
|
65
|
+
id="guide3005" />
|
|
66
|
+
<sodipodi:guide
|
|
67
|
+
orientation="0,1"
|
|
68
|
+
position="527.14286,642.85714"
|
|
69
|
+
id="guide3007" />
|
|
70
|
+
<sodipodi:guide
|
|
71
|
+
orientation="0,1"
|
|
72
|
+
position="431.42857,507.85714"
|
|
73
|
+
id="guide3009" />
|
|
74
|
+
<sodipodi:guide
|
|
75
|
+
orientation="0,1"
|
|
76
|
+
position="488.40876,783.57143"
|
|
77
|
+
id="guide3011" />
|
|
78
|
+
<sodipodi:guide
|
|
79
|
+
orientation="0,1"
|
|
80
|
+
position="505,372.85714"
|
|
81
|
+
id="guide3013" />
|
|
82
|
+
</sodipodi:namedview>
|
|
83
|
+
<metadata
|
|
84
|
+
id="metadata7">
|
|
85
|
+
<rdf:RDF>
|
|
86
|
+
<cc:Work
|
|
87
|
+
rdf:about="">
|
|
88
|
+
<dc:format>image/svg+xml</dc:format>
|
|
89
|
+
<dc:type
|
|
90
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
91
|
+
<dc:title></dc:title>
|
|
92
|
+
</cc:Work>
|
|
93
|
+
</rdf:RDF>
|
|
94
|
+
</metadata>
|
|
95
|
+
<g
|
|
96
|
+
inkscape:label="Layer 1"
|
|
97
|
+
inkscape:groupmode="layer"
|
|
98
|
+
id="layer1">
|
|
99
|
+
<path
|
|
100
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
101
|
+
d="m 176.28125,201.03125 0,0.625 0,395.125 0,0.375 0.34375,0.0937 312.34375,91.6875 0.625,0.1875 0,-0.65625 0.125,-419.09375 0,-0.40625 -0.40625,-0.0937 -312.4375,-67.71875 -0.59375,-0.125 z m 1,1.21875 311.4375,67.5 -0.125,418.0625 -311.3125,-91.375 0,-394.1875 z"
|
|
102
|
+
id="path2985"
|
|
103
|
+
inkscape:connector-curvature="0" />
|
|
104
|
+
<path
|
|
105
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
106
|
+
d="m 647.21875,206.59375 -0.6875,0.28125 -157.59375,62.21875 -0.3125,0.125 0,0.34375 0.1875,419.125 0,0.75 0.6875,-0.28125 156.0625,-63.1875 0.3125,-0.125 0,-0.34375 1.34375,-418.15625 0,-0.75 z m -1,1.4375 -1.34375,417.125 -155.0625,62.78125 -0.1875,-418.03125 156.59375,-61.875 z"
|
|
107
|
+
id="path2993"
|
|
108
|
+
inkscape:connector-curvature="0" />
|
|
109
|
+
<path
|
|
110
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
111
|
+
d="m 355.6875,137.40625 -0.15625,0.0625 L 176.96875,201.0625 177.3125,202 355.75,138.4375 646.78125,207.53125 647,206.5625 l -291.15625,-69.125 -0.15625,-0.0312 z"
|
|
112
|
+
id="path3003"
|
|
113
|
+
inkscape:connector-curvature="0" />
|
|
114
|
+
<path
|
|
115
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
116
|
+
d="m 355.71875,277.53125 -0.125,0.0312 -178.9375,47.96875 -1.8125,0.46875 1.8125,0.5 311.625,83.5 0.15625,0.0312 0.125,-0.0625 157.59375,-53.65625 1.5625,-0.53125 -1.59375,-0.4375 -290.28125,-77.78125 -0.125,-0.0312 z m 0,1.03125 L 644.3125,355.90625 488.375,409 178.71875,326 l 177,-47.4375 z"
|
|
117
|
+
id="path3015"
|
|
118
|
+
inkscape:connector-curvature="0" />
|
|
119
|
+
<path
|
|
120
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
121
|
+
d="m 355.21875,240.9375 0,37.125 1,0 0,-37.125 -1,0 z"
|
|
122
|
+
id="path3017"
|
|
123
|
+
inkscape:connector-curvature="0" />
|
|
124
|
+
<path
|
|
125
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
126
|
+
d="m 176.28125,202.65625 0,393.28125 1,0 0,-393.28125 -1,0 z"
|
|
127
|
+
id="path3019"
|
|
128
|
+
inkscape:connector-curvature="0" />
|
|
129
|
+
<path
|
|
130
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
131
|
+
d="m 355.71875,409 -0.125,0.0312 L 177,455.8125 l -1.78125,0.46875 1.78125,0.5 L 488.28125,545 l 0.15625,0.0312 0.125,-0.0625 156.71875,-56.25 1.46875,-0.53125 -1.53125,-0.40625 -289.375,-78.75 -0.125,-0.0312 z m 0,1.03125 287.6875,78.28125 L 488.375,544 179.03125,456.3125 355.71875,410.03125 z"
|
|
132
|
+
id="path3021"
|
|
133
|
+
inkscape:connector-curvature="0" />
|
|
134
|
+
<path
|
|
135
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
136
|
+
d="m 355.71875,544 -0.15625,0.0312 -178.5625,52.3125 0.28125,0.96875 178.4375,-52.28125 289.59375,80.25 0.28125,-0.96875 -289.75,-80.28125 -0.125,-0.0312 z"
|
|
137
|
+
id="path3023"
|
|
138
|
+
inkscape:connector-curvature="0" />
|
|
139
|
+
<path
|
|
140
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
141
|
+
d="m 355.21875,374.34375 0,35.15625 1,0 0,-35.15625 -1,0 z"
|
|
142
|
+
id="path3025"
|
|
143
|
+
inkscape:connector-curvature="0" />
|
|
144
|
+
<path
|
|
145
|
+
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
|
|
146
|
+
d="m 355.1875,507.03125 0,37.4375 1.03125,0 0,-37.4375 -1.03125,0 z"
|
|
147
|
+
id="path3027"
|
|
148
|
+
inkscape:connector-curvature="0" />
|
|
149
|
+
</g>
|
|
150
|
+
</svg>
|
data/contrib/rack_logo.svg
CHANGED
data/contrib/rdoc.css
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
/* Forked from the Darkfish templates rdoc.css file, much hacked, probably
|
|
2
|
+
* imperfect */
|
|
3
|
+
|
|
4
|
+
html { max-width: 960px; margin: 0 auto; }
|
|
5
|
+
body {
|
|
6
|
+
font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif;
|
|
7
|
+
}
|
|
8
|
+
body.file-popup {
|
|
9
|
+
font-size: 90%;
|
|
10
|
+
margin-left: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h1 {
|
|
14
|
+
color: #4183C4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:link,
|
|
18
|
+
:visited {
|
|
19
|
+
color: #4183C4;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
:link:hover,
|
|
23
|
+
:visited:hover {
|
|
24
|
+
border-bottom: 1px dotted #4183C4;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
pre, pre.description {
|
|
28
|
+
font: 12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
|
|
29
|
+
padding: 1em;
|
|
30
|
+
overflow: auto;
|
|
31
|
+
line-height: 1.4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* @group Generic Classes */
|
|
35
|
+
|
|
36
|
+
.initially-hidden {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#search-field {
|
|
41
|
+
width: 98%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.missing-docs {
|
|
45
|
+
font-size: 120%;
|
|
46
|
+
background: white url(images/wrench_orange.png) no-repeat 4px center;
|
|
47
|
+
color: #ccc;
|
|
48
|
+
line-height: 2em;
|
|
49
|
+
border: 1px solid #d00;
|
|
50
|
+
opacity: 1;
|
|
51
|
+
text-indent: 24px;
|
|
52
|
+
letter-spacing: 3px;
|
|
53
|
+
font-weight: bold;
|
|
54
|
+
-webkit-border-radius: 5px;
|
|
55
|
+
-moz-border-radius: 5px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.target-section {
|
|
59
|
+
border: 2px solid #dcce90;
|
|
60
|
+
border-left-width: 8px;
|
|
61
|
+
background: #fff3c2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* @end */
|
|
65
|
+
|
|
66
|
+
/* @group Index Page, Standalone file pages */
|
|
67
|
+
.indexpage ul {
|
|
68
|
+
line-height: 160%;
|
|
69
|
+
list-style: none;
|
|
70
|
+
}
|
|
71
|
+
.indexpage ul :link,
|
|
72
|
+
.indexpage ul :visited {
|
|
73
|
+
font-size: 16px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.indexpage li {
|
|
77
|
+
padding-left: 20px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.indexpage ul > li {
|
|
81
|
+
background: url(images/bullet_black.png) no-repeat left 4px;
|
|
82
|
+
}
|
|
83
|
+
.indexpage li.method {
|
|
84
|
+
background: url(images/plugin.png) no-repeat left 4px;
|
|
85
|
+
}
|
|
86
|
+
.indexpage li.module {
|
|
87
|
+
background: url(images/package.png) no-repeat left 4px;
|
|
88
|
+
}
|
|
89
|
+
.indexpage li.class {
|
|
90
|
+
background: url(images/ruby.png) no-repeat left 4px;
|
|
91
|
+
}
|
|
92
|
+
.indexpage li.file {
|
|
93
|
+
background: url(images/page_white_text.png) no-repeat left 4px;
|
|
94
|
+
}
|
|
95
|
+
.indexpage li li {
|
|
96
|
+
background: url(images/tag_blue.png) no-repeat left 4px;
|
|
97
|
+
}
|
|
98
|
+
.indexpage li .toc-toggle {
|
|
99
|
+
width: 16px;
|
|
100
|
+
height: 16px;
|
|
101
|
+
background: url(images/add.png) no-repeat;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.indexpage li .toc-toggle.open {
|
|
105
|
+
background: url(images/delete.png) no-repeat;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* @end */
|
|
109
|
+
|
|
110
|
+
/* @group Top-Level Structure */
|
|
111
|
+
|
|
112
|
+
.project-section, #file-metadata, #class-metadata {
|
|
113
|
+
display: block;
|
|
114
|
+
background: #f5f5f5;
|
|
115
|
+
margin-bottom: 1em;
|
|
116
|
+
padding: 0.5em;
|
|
117
|
+
}
|
|
118
|
+
.project-section h3, #file-metadata h3, #class-metadata h3 {
|
|
119
|
+
margin: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#metadata {
|
|
123
|
+
float: left;
|
|
124
|
+
width: 280px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#documentation {
|
|
128
|
+
margin: 2em 1em 2em 300px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
#validator-badges {
|
|
132
|
+
clear: both;
|
|
133
|
+
margin: 1em 1em 2em;
|
|
134
|
+
font-size: smaller;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* @end */
|
|
138
|
+
|
|
139
|
+
/* @group Metadata Section */
|
|
140
|
+
|
|
141
|
+
#metadata ul,
|
|
142
|
+
#metadata dl,
|
|
143
|
+
#metadata p {
|
|
144
|
+
padding: 0px;
|
|
145
|
+
list-style: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
dl.svninfo {
|
|
149
|
+
color: #666;
|
|
150
|
+
margin: 0;
|
|
151
|
+
}
|
|
152
|
+
dl.svninfo dt {
|
|
153
|
+
font-weight: bold;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
ul.link-list li {
|
|
157
|
+
white-space: nowrap;
|
|
158
|
+
}
|
|
159
|
+
ul.link-list .type {
|
|
160
|
+
font-size: 8px;
|
|
161
|
+
text-transform: uppercase;
|
|
162
|
+
color: white;
|
|
163
|
+
background: #969696;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* @end */
|
|
167
|
+
|
|
168
|
+
/* @group Documentation Section */
|
|
169
|
+
|
|
170
|
+
.note-list {
|
|
171
|
+
margin: 8px 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.label-list {
|
|
175
|
+
margin: 8px 1.5em;
|
|
176
|
+
border: 1px solid #ccc;
|
|
177
|
+
}
|
|
178
|
+
.description .label-list {
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.note-list dt {
|
|
183
|
+
font-weight: bold;
|
|
184
|
+
}
|
|
185
|
+
.note-list dd {
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.label-list dt {
|
|
189
|
+
font-weight: bold;
|
|
190
|
+
background: #ddd;
|
|
191
|
+
}
|
|
192
|
+
.label-list dd {
|
|
193
|
+
}
|
|
194
|
+
.label-list dd + dt,
|
|
195
|
+
.note-list dd + dt {
|
|
196
|
+
margin-top: 0.7em;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
#documentation .section {
|
|
200
|
+
font-size: 90%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
#documentation h2.section-header {
|
|
204
|
+
color: #333;
|
|
205
|
+
font-size: 175%;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.documentation-section-title {
|
|
209
|
+
position: relative;
|
|
210
|
+
}
|
|
211
|
+
.documentation-section-title .section-click-top {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: 6px;
|
|
214
|
+
right: 12px;
|
|
215
|
+
font-size: 10px;
|
|
216
|
+
visibility: hidden;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.documentation-section-title:hover .section-click-top {
|
|
220
|
+
visibility: visible;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
#documentation h3.section-header {
|
|
224
|
+
color: #333;
|
|
225
|
+
font-size: 150%;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
#constants-list > dl,
|
|
229
|
+
#attributes-list > dl {
|
|
230
|
+
margin: 1em 0 2em;
|
|
231
|
+
border: 0;
|
|
232
|
+
}
|
|
233
|
+
#constants-list > dl dt,
|
|
234
|
+
#attributes-list > dl dt {
|
|
235
|
+
font-weight: bold;
|
|
236
|
+
font-family: Monaco, "Andale Mono";
|
|
237
|
+
background: inherit;
|
|
238
|
+
}
|
|
239
|
+
#constants-list > dl dt a,
|
|
240
|
+
#attributes-list > dl dt a {
|
|
241
|
+
color: inherit;
|
|
242
|
+
}
|
|
243
|
+
#constants-list > dl dd,
|
|
244
|
+
#attributes-list > dl dd {
|
|
245
|
+
margin: 0 0 1em 0;
|
|
246
|
+
color: #666;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.documentation-section h2 {
|
|
250
|
+
position: relative;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.documentation-section h2 a {
|
|
254
|
+
position: absolute;
|
|
255
|
+
top: 8px;
|
|
256
|
+
right: 10px;
|
|
257
|
+
font-size: 12px;
|
|
258
|
+
color: #9b9877;
|
|
259
|
+
visibility: hidden;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.documentation-section h2:hover a {
|
|
263
|
+
visibility: visible;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* @group Method Details */
|
|
267
|
+
|
|
268
|
+
#documentation .method-source-code {
|
|
269
|
+
display: none;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
#documentation .method-detail {
|
|
273
|
+
margin: 0.2em 0.2em;
|
|
274
|
+
padding: 0.5em;
|
|
275
|
+
}
|
|
276
|
+
#documentation .method-detail:hover {
|
|
277
|
+
background-color: #f5f5f5;
|
|
278
|
+
}
|
|
279
|
+
#documentation .method-heading {
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
position: relative;
|
|
282
|
+
font-size: 125%;
|
|
283
|
+
line-height: 125%;
|
|
284
|
+
font-weight: bold;
|
|
285
|
+
color: #333;
|
|
286
|
+
background: url(images/brick.png) no-repeat left bottom;
|
|
287
|
+
padding-left: 20px;
|
|
288
|
+
}
|
|
289
|
+
#documentation .method-heading :link,
|
|
290
|
+
#documentation .method-heading :visited {
|
|
291
|
+
color: inherit;
|
|
292
|
+
}
|
|
293
|
+
#documentation .method-click-advice {
|
|
294
|
+
position: absolute;
|
|
295
|
+
right: 5px;
|
|
296
|
+
font-size: 10px;
|
|
297
|
+
color: #aaa;
|
|
298
|
+
visibility: hidden;
|
|
299
|
+
background: url(images/zoom.png) no-repeat right 5px;
|
|
300
|
+
padding-right: 20px;
|
|
301
|
+
overflow: show;
|
|
302
|
+
}
|
|
303
|
+
#documentation .method-heading:hover .method-click-advice {
|
|
304
|
+
visibility: visible;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
#documentation .method-alias .method-heading {
|
|
308
|
+
color: #666;
|
|
309
|
+
background: url(images/brick_link.png) no-repeat left bottom;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
#documentation .method-description,
|
|
313
|
+
#documentation .aliases {
|
|
314
|
+
margin: 0 20px;
|
|
315
|
+
color: #666;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
#documentation .method-description p,
|
|
319
|
+
#documentation .aliases p {
|
|
320
|
+
line-height: 1.2em;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
#documentation .aliases {
|
|
324
|
+
font-style: italic;
|
|
325
|
+
cursor: default;
|
|
326
|
+
}
|
|
327
|
+
#documentation .method-description p {
|
|
328
|
+
margin-bottom: 0.5em;
|
|
329
|
+
}
|
|
330
|
+
#documentation .method-description ul {
|
|
331
|
+
margin-left: 1.5em;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
#documentation .attribute-method-heading {
|
|
335
|
+
background: url(images/tag_green.png) no-repeat left bottom;
|
|
336
|
+
}
|
|
337
|
+
#documentation #attribute-method-details .method-detail:hover {
|
|
338
|
+
background-color: transparent;
|
|
339
|
+
cursor: default;
|
|
340
|
+
}
|
|
341
|
+
#documentation .attribute-access-type {
|
|
342
|
+
font-size: 60%;
|
|
343
|
+
text-transform: uppercase;
|
|
344
|
+
vertical-align: super;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.method-section .method-source-code {
|
|
348
|
+
background: white;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* @group Source Code */
|
|
352
|
+
|
|
353
|
+
.ruby-constant .ruby-keyword .ruby-ivar .ruby-operator .ruby-identifier
|
|
354
|
+
.ruby-node .ruby-comment .ruby-regexp .ruby-value {
|
|
355
|
+
background: transparent;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Thanks GitHub!!! */
|
|
359
|
+
.ruby-constant { color: #458; font-weight: bold; }
|
|
360
|
+
.ruby-keyword { color: black; font-weight: bold; }
|
|
361
|
+
.ruby-ivar { color: teal; }
|
|
362
|
+
.ruby-operator { color: #000; }
|
|
363
|
+
.ruby-identifier { color: black; }
|
|
364
|
+
.ruby-node { color: red; }
|
|
365
|
+
.ruby-comment { color: #998; font-weight: bold; }
|
|
366
|
+
.ruby-regexp { color: #009926; }
|
|
367
|
+
.ruby-value { color: #099; }
|
|
368
|
+
.ruby-string { color: red; }
|
|
369
|
+
|
|
370
|
+
/* @group search results */
|
|
371
|
+
|
|
372
|
+
#search-section .section-header {
|
|
373
|
+
margin: 0;
|
|
374
|
+
padding: 0;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
#search-results {
|
|
378
|
+
width: 100%;
|
|
379
|
+
list-style: none;
|
|
380
|
+
margin: 0;
|
|
381
|
+
padding: 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
#search-results h1 {
|
|
385
|
+
font-size: 1em;
|
|
386
|
+
font-weight: normal;
|
|
387
|
+
text-shadow: none;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
#search-results .current {
|
|
391
|
+
background: #eee;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
#search-results li {
|
|
395
|
+
list-style: none;
|
|
396
|
+
line-height: 1em;
|
|
397
|
+
padding: 0.5em;
|
|
398
|
+
border-bottom: 1px solid black;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
#search-results .search-namespace {
|
|
402
|
+
font-weight: bold;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
#search-results li em {
|
|
406
|
+
background: yellow;
|
|
407
|
+
font-style: normal;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
#search-results pre {
|
|
411
|
+
margin: 0.5em;
|
|
412
|
+
}
|
data/example/protectedlobster.rb
CHANGED
|
@@ -11,4 +11,4 @@ protected_lobster.realm = 'Lobster 2.0'
|
|
|
11
11
|
|
|
12
12
|
pretty_protected_lobster = Rack::ShowStatus.new(Rack::ShowExceptions.new(protected_lobster))
|
|
13
13
|
|
|
14
|
-
Rack::
|
|
14
|
+
Rack::Server.start :app => pretty_protected_lobster, :Port => 9292
|
|
@@ -17,8 +17,8 @@ module Rack
|
|
|
17
17
|
|
|
18
18
|
def unauthorized(www_authenticate = challenge)
|
|
19
19
|
return [ 401,
|
|
20
|
-
{
|
|
21
|
-
|
|
20
|
+
{ CONTENT_TYPE => 'text/plain',
|
|
21
|
+
CONTENT_LENGTH => '0',
|
|
22
22
|
'WWW-Authenticate' => www_authenticate.to_s },
|
|
23
23
|
[]
|
|
24
24
|
]
|
|
@@ -26,8 +26,8 @@ module Rack
|
|
|
26
26
|
|
|
27
27
|
def bad_request
|
|
28
28
|
return [ 400,
|
|
29
|
-
{
|
|
30
|
-
|
|
29
|
+
{ CONTENT_TYPE => 'text/plain',
|
|
30
|
+
CONTENT_LENGTH => '0' },
|
|
31
31
|
[]
|
|
32
32
|
]
|
|
33
33
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'rack/request'
|
|
2
|
+
|
|
1
3
|
module Rack
|
|
2
4
|
module Auth
|
|
3
5
|
class AbstractRequest
|
|
@@ -6,6 +8,10 @@ module Rack
|
|
|
6
8
|
@env = env
|
|
7
9
|
end
|
|
8
10
|
|
|
11
|
+
def request
|
|
12
|
+
@request ||= Request.new(@env)
|
|
13
|
+
end
|
|
14
|
+
|
|
9
15
|
def provided?
|
|
10
16
|
!authorization_key.nil?
|
|
11
17
|
end
|
|
@@ -15,11 +21,7 @@ module Rack
|
|
|
15
21
|
end
|
|
16
22
|
|
|
17
23
|
def scheme
|
|
18
|
-
@scheme ||=
|
|
19
|
-
begin
|
|
20
|
-
s = parts.first.downcase
|
|
21
|
-
Rack::Auth.schemes.include?(s) ? s.to_sym : s
|
|
22
|
-
end
|
|
24
|
+
@scheme ||= parts.first && parts.first.downcase
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
def params
|
data/lib/rack/auth/basic.rb
CHANGED
data/lib/rack/auth/digest/md5.rb
CHANGED
|
@@ -21,9 +21,13 @@ module Rack
|
|
|
21
21
|
|
|
22
22
|
attr_writer :passwords_hashed
|
|
23
23
|
|
|
24
|
-
def initialize(
|
|
25
|
-
super
|
|
24
|
+
def initialize(app, realm=nil, opaque=nil, &authenticator)
|
|
26
25
|
@passwords_hashed = nil
|
|
26
|
+
if opaque.nil? and realm.respond_to? :values_at
|
|
27
|
+
realm, opaque, @passwords_hashed = realm.values_at :realm, :opaque, :passwords_hashed
|
|
28
|
+
end
|
|
29
|
+
super(app, realm, &authenticator)
|
|
30
|
+
@opaque = opaque
|
|
27
31
|
end
|
|
28
32
|
|
|
29
33
|
def passwords_hashed?
|
|
@@ -92,7 +96,7 @@ module Rack
|
|
|
92
96
|
|
|
93
97
|
def valid_digest?(auth)
|
|
94
98
|
pw = @authenticator.call(auth.username)
|
|
95
|
-
pw && digest(auth, pw)
|
|
99
|
+
pw && Rack::Utils.secure_compare(digest(auth, pw), auth.response)
|
|
96
100
|
end
|
|
97
101
|
|
|
98
102
|
def md5(data)
|