about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-07 21:47:12 +0000
committerEric Wong <mwrap-public@80x24.org>2023-01-07 21:51:24 +0000
commit40893ed4ddc5d92cce36ee951e9c7ae67b96f41a (patch)
treebb6151e6ebae524f00354fa0fe5b99e06a6ffe6f
parenta03b72e85011b71e031447b9c8c917e6f2c08c81 (diff)
downloadmwrap-40893ed4ddc5d92cce36ee951e9c7ae67b96f41a.tar.gz
Rack 3 requires lowercase headers, and they work with any
Rack <=2.x version.
-rw-r--r--lib/mwrap_rack.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/mwrap_rack.rb b/lib/mwrap_rack.rb
index c777a78..1bd00ac 100644
--- a/lib/mwrap_rack.rb
+++ b/lib/mwrap_rack.rb
@@ -22,10 +22,10 @@ class MwrapRack
   module HtmlResponse # :nodoc:
     def response
       [ 200, {
-          'Expires' => 'Fri, 01 Jan 1980 00:00:00 GMT',
-          'Pragma' => 'no-cache',
-          'Cache-Control' => 'no-cache, max-age=0, must-revalidate',
-          'Content-Type' => 'text/html; charset=UTF-8',
+          'expires' => 'Fri, 01 Jan 1980 00:00:00 GMT',
+          'pragma' => 'no-cache',
+          'cache-control' => 'no-cache, max-age=0, must-revalidate',
+          'content-type' => 'text/html; charset=UTF-8',
         }, self ]
     end
   end
@@ -90,7 +90,7 @@ class MwrapRack
   end
 
   def r404 # :nodoc:
-    [404,{'Content-Type'=>'text/plain'},["Not found\n"]]
+    [404,{'content-type'=>'text/plain'},["Not found\n"]]
   end
 
   # The standard Rack application endpoint for MwrapRack
@@ -111,7 +111,7 @@ class MwrapRack
           "<body><p><a href=\"each/#{n}\">allocations &gt;#{n} bytes</a>" \
           "<p><a href=\"#{u}\">#{u}</a>" \
           "</body></html>\n")
-      [ 200, {'Content-Type'=>'text/html','Content-Length'=>-b.size.to_s},[b]]
+      [ 200, {'content-type'=>'text/html','content-length'=>-b.size.to_s},[b]]
     else
       r404
     end