diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:53:24 +0000 |
commit | b5f8ee61a7f7e9bd291dd26b0585d03eb686c941 (patch) | |
tree | d4d31289c39fc00da064a825df13a0b98ce95b10 /web/server/h2o/libh2o/examples/h2o_mruby | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.46.3.upstream
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.conf | 25 | ||||
-rw-r--r-- | web/server/h2o/libh2o/examples/h2o_mruby/hello.rb | 32 |
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 |