summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/examples/h2o_mruby
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:19:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:07:37 +0000
commitb485aab7e71c1625cfc27e0f92c9509f42378458 (patch)
treeae9abe108601079d1679194de237c9a435ae5b55 /web/server/h2o/libh2o/examples/h2o_mruby
parentAdding upstream version 1.44.3. (diff)
downloadnetdata-b485aab7e71c1625cfc27e0f92c9509f42378458.tar.xz
netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.zip
Adding upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/examples/h2o_mruby')
-rw-r--r--web/server/h2o/libh2o/examples/h2o_mruby/h2o.conf25
-rw-r--r--web/server/h2o/libh2o/examples/h2o_mruby/hello.rb32
2 files changed, 0 insertions, 57 deletions
diff --git a/web/server/h2o/libh2o/examples/h2o_mruby/h2o.conf b/web/server/h2o/libh2o/examples/h2o_mruby/h2o.conf
deleted file mode 100644
index cf94ec3ab..000000000
--- a/web/server/h2o/libh2o/examples/h2o_mruby/h2o.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# to find out the configuration commands, run: h2o --help
-
-listen: 8080
-listen:
- port: 8081
- ssl:
- certificate-file: examples/h2o/server.crt
- key-file: examples/h2o/server.key
-hosts:
- "127.0.0.1.xip.io:8080":
- paths:
- /:
- file.dir: examples/doc_root
- mruby.handler-file: examples/h2o_mruby/hello.rb
- access-log: /dev/stdout
- "alternate.127.0.0.1.xip.io:8081":
- listen:
- port: 8081
- ssl:
- certificate-file: examples/h2o/alternate.crt
- key-file: examples/h2o/alternate.key
- paths:
- /:
- file.dir: examples/doc_root.alternate
- access-log: /dev/stdout
diff --git a/web/server/h2o/libh2o/examples/h2o_mruby/hello.rb b/web/server/h2o/libh2o/examples/h2o_mruby/hello.rb
deleted file mode 100644
index bceb7b0cd..000000000
--- a/web/server/h2o/libh2o/examples/h2o_mruby/hello.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# paths:
-# /:
-# file.dir: examples/doc_root
-# mruby.handler-file: /path/to/hello.rb
-
-class HelloApp
- def call(env)
- h = "hello"
- m = "from h2o_mruby"
-
- ua = env["HTTP_USER_AGENT"]
- new_ua = "new-#{ua}-h2o_mruby"
- path = env["PATH_INFO"]
- host = env["HTTP_HOST"]
- method = env["REQUEST_METHOD"]
- query = env["QUERY_STRING"]
- input = env["rack.input"] ? env["rack.input"].read : ""
-
- msg = "#{h} #{m}. User-Agent:#{ua} New User-Agent:#{new_ua} path:#{path} host:#{host} method:#{method} query:#{query} input:#{input}"
-
- [200,
- {
- "content-type" => "text/plain; charset=utf-8",
- "user-agent" => new_ua,
- },
- ["#{msg}\n"]
- ]
-
- end
-end
-
-HelloApp.new