From b5bcab2d1594889f93d6f9c698e6b3bd17bf7ef3 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Mon, 6 Aug 2012 09:41:16 +0000 Subject: [PATCH] xforms git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369762 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/developer/lua.html.en | 187 ++++----------------------- docs/manual/howto/htaccess.html.en | 2 +- docs/manual/howto/htaccess.xml.fr | 2 +- docs/manual/howto/htaccess.xml.ja | 2 +- docs/manual/howto/htaccess.xml.ko | 2 +- docs/manual/howto/htaccess.xml.pt-br | 2 +- 6 files changed, 33 insertions(+), 164 deletions(-) diff --git a/docs/manual/developer/lua.html.en b/docs/manual/developer/lua.html.en index 31f3563218..4f1787c10a 100644 --- a/docs/manual/developer/lua.html.en +++ b/docs/manual/developer/lua.html.en @@ -431,7 +431,7 @@ end

Example 5: Overlays using LuaMapHandler

-LuaMaphandler ^/portal/([a-z]+)/   /path/to/lua/script.lua handle_$1
+LuaMapHandler ^/portal/([a-z]+)/   /path/to/lua/script.lua handle_$1
 
top
@@ -831,10 +831,6 @@ print(unescaped) -- prints "This is a test"
apache2.port
-apache2.getenv -
-apache2.setenv -
apache2.options
apache2.allowoverrides @@ -843,8 +839,6 @@ print(unescaped) -- prints "This is a test"
apache2.add_input_filter
-apache2.add_output_filter -
apache2.get_basic_auth_pw
apache2.get_limit_req_body @@ -855,12 +849,10 @@ print(unescaped) -- prints "This is a test"
apache2.some_auth_required
-apache2.context_document_root -
-apache2.context_prefix -
apache2.set_context_prefix
+apache2.get_server_name_for_url +
apache2.set_keepalive
apache2.make_etag @@ -912,40 +904,6 @@ apache2.add_input_filter(r, "SPAM_FILTER") -- Check input for spam..?

 

-

apache2.add_output_filter( - request_rec r,  string filter - ) -

- -

-Adds an output filter to the request -

-

-Arguments: -

- - - - - - - - - - - - - -
ArgumentDescription
rThe mod_lua request handle
filterThe name of the filter handler to add
-

-Example: -

-
-apache2.add_input_filter(r, "INCLUDES") -- Turn out output into an SSI-enabled document.
-        
- -

 

-

apache2.allowoverrides( request_rec r ) @@ -1040,52 +998,6 @@ The current Authorization type used in the request

 

-

apache2.context_document_root( - request_rec r - ) -

- -

-Get the context_document_root for a request. This is a generalization of the document root, which is too limited in the presence of mappers like mod_userdir and mod_alias. The context_document_root is the directory on disk that maps to the context_prefix URI prefix. -

-

-Arguments: -

- - - - - - - - - -
ArgumentDescription
rThe mod_lua request handle
-

 

- -

apache2.context_prefix( - request_rec r - ) -

- -

-Get the context_prefix for a request. The context_prefix URI prefix maps to the context_document_root on disk. -

-

-Arguments: -

- - - - - - - - - -
ArgumentDescription
rThe mod_lua request handle
-

 

-

apache2.flush( request_rec r ) @@ -1182,7 +1094,7 @@ r:puts("You can't upload files bigger than ", limit, " bytes!")

 

apache2.get_server_name( - + request_rec r )

@@ -1192,7 +1104,16 @@ Returns the current server name from the request

Arguments:

-

None

+ + + + + + + + + +
ArgumentDescription
rThe mod_lua request handle

Return value(s):
@@ -1208,13 +1129,14 @@ r:puts("The ServerName is set to: ", name)

 

-

apache2.getenv( - request_rec r,  string key +

apache2.get_server_name_for_url( + request_rec r )

-Returns the value of an environment variable +Get the current server name from the request for the purposes of using in a URL. +If the server name is an IPv6 literal address, it will be returned in URL format (e.g., "[fe80::1]").

Arguments: @@ -1228,26 +1150,7 @@ Returns the value of an environment variable r The mod_lua request handle - -key -key - -

-Return value(s): -
-The queried value -

-

-Example: -

-
-local env = apache2.getenv("HTTP_HOST")
-if env and env:len() > 0 then
-    r:puts("HTTP_HOST equals ", env)
-end
-        
-

 

apache2.make_etag( @@ -1394,7 +1297,7 @@ end

 

apache2.requestbody( - request_rec r,  string filename + request_rec r,  number size,  string filename )

@@ -1414,8 +1317,12 @@ Reads the request body. If a filename is specified, the request body will be wri The mod_lua request handle +size +The maximum size allowed, or 0/nil for unlimited size + + filename -filename +The file to save the output to, or nil to return it as a string

@@ -1428,10 +1335,10 @@ The number of bytes written if a filename was specified, otherwise it returns th

 if tonumber(r.headers_in['Content-Length'] or 0) < 10000 then
-    local smallfile = apache2.requestbody(r) -- fetch a small file into memory
+    local smallfile = apache2.requestbody(r, 10000) -- fetch a small file into memory
     r:puts("I saved the uploaded file in memory")
 else
-    local read = apache2.requestbody(r, "/path/to/tmp")
+    local read = apache2.requestbody(r, 0, "/path/to/tmp")
     r:puts("I saved the uploaded file in a temp directory. Total bytes written was: ", read)
 end
         
@@ -1640,44 +1547,6 @@ True if keepalive can be set, false otherwise

 

-

apache2.setenv( - request_rec r,  string key,  string val - ) -

- -

-Sets the value of an environment variable -

-

-Arguments: -

- - - - - - - - - - - - - - - - - -
ArgumentDescription
rThe mod_lua request handle
keykey
valval
-

-Example: -

-
-apache2.setenv("FOO_VAL", "bar and stuff")
-        
- -

 

-

apache2.some_auth_required( request_rec r ) @@ -1762,7 +1631,7 @@ True if the expression evaluates as true, false if the expression doesn't evalua

 if apache2.expr("%{REQUEST_URI} =~ /force-gzip") then
-    apache2.add_output_filter(r, "DEFLATE")
+    r:addoutputfilter("DEFLATE")
 end
         
@@ -2360,7 +2229,7 @@ Kills off a server process. This has no other use than to show how dangerous mod

-Opens up a new database connection. +Opens up a new database connection. See the DB functions for mod_pLua for more info on this.

Arguments: diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index f58b212c41..9aa6947aeb 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -43,7 +43,7 @@ changes on a per-directory basis.

top

.htaccess files

- +
You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. diff --git a/docs/manual/howto/htaccess.xml.fr b/docs/manual/howto/htaccess.xml.fr index 73386760fc..d15b3cb62a 100644 --- a/docs/manual/howto/htaccess.xml.fr +++ b/docs/manual/howto/htaccess.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/howto/htaccess.xml.ja b/docs/manual/howto/htaccess.xml.ja index 677058cf06..8508ccc005 100644 --- a/docs/manual/howto/htaccess.xml.ja +++ b/docs/manual/howto/htaccess.xml.ja @@ -1,7 +1,7 @@ - + + +