Browse Source

Merge pull request #380 from pbooth/openrestyPlaintext

adds Test #6  plaintext URL for openresty
michaelhixson 12 years ago
parent
commit
d58b9d90c4
2 changed files with 5 additions and 1 deletions
  1. 4 1
      openresty/app.lua
  2. 1 0
      openresty/benchmark_config

+ 4 - 1
openresty/app.lua

@@ -35,7 +35,10 @@ function _M.handler(ngx)
         end
         ngx.print( encode(worlds) )
         local ok, err = db:set_keepalive(0, 256)
+    elseif ngx.var.uri == '/plaintext' then
+        ngx.header.content_type = 'text/plain'
+        ngx.print('Hello, World!')
     end
 end
 
-return _M
+return _M

+ 1 - 0
openresty/benchmark_config

@@ -6,6 +6,7 @@
       "json_url": "/json",
       "db_url": "/db",
       "query_url": "/db?queries=",
+      "plaintext_url": "/plaintext",
       "port": 8080,
       "sort": 50
     }