File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def write_nonblock(buffer)
155155 write ( buffer )
156156 end
157157
158- def << ( buffer )
158+ def <<( buffer )
159159 write ( buffer )
160160 end
161161
Original file line number Diff line number Diff line change @@ -55,25 +55,25 @@ def self.close
5555 end
5656
5757 def self . call ( request )
58- Response [ 200 , { } , [ ] ]
58+ Response [ 200 ]
5959 end
6060 end
6161
62- module HelloWorld
62+ module NotFound
6363 def self . close
6464 end
6565
6666 def self . call ( request )
67- Response [ 200 , Headers [ 'content-type' => 'text/plain' ] , [ "Hello World!" ] ]
67+ Response [ 404 ]
6868 end
6969 end
7070
71- module NotFound
71+ module HelloWorld
7272 def self . close
7373 end
7474
7575 def self . call ( request )
76- Response [ 404 , Headers [ ] , [ ] ]
76+ Response [ 200 , Headers [ 'content-type' => 'text/plain' ] , [ "Hello World!" ] ]
7777 end
7878 end
7979 end
Original file line number Diff line number Diff line change 2525module Protocol
2626 module HTTP
2727 class Middleware
28- module NotFound
29- def self . close
30- end
31-
32- def self . call ( request )
33- Response [ 404 , Headers [ ] , [ ] ]
34- end
35- end
36-
3728 class Builder
3829 def initialize ( default_app = NotFound )
3930 @use = [ ]
You can’t perform that action at this time.
0 commit comments