From be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 04:57:58 +0200 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- .../h2o/libh2o/doc/configure/mruby_directives.html | 144 +++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 web/server/h2o/libh2o/doc/configure/mruby_directives.html (limited to 'web/server/h2o/libh2o/doc/configure/mruby_directives.html') diff --git a/web/server/h2o/libh2o/doc/configure/mruby_directives.html b/web/server/h2o/libh2o/doc/configure/mruby_directives.html new file mode 100644 index 00000000..2a188a5b --- /dev/null +++ b/web/server/h2o/libh2o/doc/configure/mruby_directives.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + +Mruby Directives - Configure - H2O - the optimized HTTP/2 server + + +
+
+ +

+H2O +

+

the optimized HTTP/1.x, HTTP/2 server

+ + +
+ +
+ +
+
+
+Powered by Oktavia +
+
+ + +
+ + + + + + + + + + + + +
+ +

+Configure > +Mruby Directives +

+ + +

+The following are the configuration directives of the mruby handler. +Please refer to Using mruby to find out how to write handlers using mruby. +

+ + + +
+
Description:
+
+

+Upon start-up evaluates given mruby expression, and uses the returned mruby object to handle the incoming requests. + +

+ + +
+
Example. Hello-world in mruby
+
mruby.handler: |
+  Proc.new do |env|
+    [200, {'content-type' => 'text/plain'}, ["Hello world\n"]]
+  end
+
+
+ + +

+Note that the provided expression is evaluated more than once (typically for every thread that accepts incoming connections). +

+ +
+
Level:
+
path
+
See also:
+
mruby.handler-file +
+
+ + + +
+
Description:
+
+

+Upon start-up evaluates given mruby file, and uses the returned mruby object to handle the incoming requests. + +

+ + +
+
Example. Hello-world in mruby
+
mruby.handler-file: /path/to/my-mruby-handler.rb
+
+
+ + +

+Note that the provided expression is evaluated more than once (typically for every thread that accepts incoming connections). +

+ +
+
Level:
+
path
+
See also:
+
mruby.handler +
+
+ + + + +
+ + + -- cgit v1.2.3