From: Rainer Jung Date: Mon, 17 Jun 2013 20:57:23 +0000 (+0000) Subject: Update transformations. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1b6ee74e91f183cbe9da716155f40a488d7d247;p=thirdparty%2Fapache%2Fhttpd.git Update transformations. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493933 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_lua.html.en b/docs/manual/mod/mod_lua.html.en index b6789f102e3..9f45d2611c7 100644 --- a/docs/manual/mod/mod_lua.html.en +++ b/docs/manual/mod/mod_lua.html.en @@ -770,7 +770,14 @@ local escaped = r:escape(url) -- returns 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b r:unescape(string) -- Unescapes an URL-escaped string: local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5" -local unescaped = r:escape(url) -- returns 'http://foo.bar/1 2 3 & 4 + 5' +local unescaped = r:unescape(url) -- returns 'http://foo.bar/1 2 3 & 4 + 5' + + + +
+r:construct_url(string) -- Constructs an URL from an URI
+
+local url = r:construct_url(r.uri) 
 
@@ -936,7 +943,7 @@ r:state_query(string) -- Queries the server for state information
-r:stat(filename) -- Runs stat() on a file, and returns a table with file information:
+r:stat(filename [,wanted]) -- Runs stat() on a file, and returns a table with file information:
 
 local info = r:stat("/var/www/foo.txt")
 if info then
@@ -946,7 +953,7 @@ end
 
 
 
-r:regex(string, pattern, [flags]) -- Runs a regular expression match on a string, returning captures if matched:
+r:regex(string, pattern [,flags]) -- Runs a regular expression match on a string, returning captures if matched:
 
 local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]])
 if matches then
@@ -997,6 +1004,50 @@ end
 
+
+r:htpassword(string [,algorithm [,cost]]) -- Creates a password hash from a string.
+                                          -- algorithm: 0 = APMD5 (default), 1 = SHA, 2 = BCRYPT, 3 = CRYPT.
+                                          -- cost: only valid with BCRYPT algorithm (default = 5).
+
+ + +
+r:mkdir(dir [,mode]) -- Creates a directory and sets mode to optional mode paramter.
+
+ + +
+r:rmdir(dir) -- Removes a directory.
+
+ + +
+r:get_direntries(dir) -- Returns a table with all directory entries.
+
+-- Return path splitted into components dir, file, ext
+function split_path(path)
+  return path:match("(.-)([^\\/]-%.?([^%.\\/]*))$")
+end
+
+function handle(r)
+  local cwd, _, _ = split_path(r.filename)
+  for _, f in ipairs(r:get_direntries(cwd)) do
+    local info = r:stat(cwd .. f)
+    if info then
+      local mtime = os.date(fmt, info.mtime / 1000000)
+      local ftype = (info.filetype == 2) and "[dir] " or "[file]"
+      r:puts( ("%s  %s %10i  %s\n"):format(ftype, mtime, info.size, f) )
+    end
+  end
+end
+
+ + +
+r.date_parse_rfc(string) -- Parses a date/time string and returns seconds since epoche.
+
+ +
top

Logging Functions

diff --git a/docs/manual/mod/mod_lua.html.fr b/docs/manual/mod/mod_lua.html.fr index 3a80708ad1d..b4d0d4a6247 100644 --- a/docs/manual/mod/mod_lua.html.fr +++ b/docs/manual/mod/mod_lua.html.fr @@ -27,6 +27,8 @@

Langues Disponibles:  en  |  fr 

+
Cette traduction peut être périmée. Vérifiez la version + anglaise pour les changements récents.
diff --git a/docs/manual/mod/mod_lua.xml.fr b/docs/manual/mod/mod_lua.xml.fr index 8d1637eec2b..04a9f3b0c92 100644 --- a/docs/manual/mod/mod_lua.xml.fr +++ b/docs/manual/mod/mod_lua.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/mod/mod_lua.xml.meta b/docs/manual/mod/mod_lua.xml.meta index b55c7710e95..8fc1a0efdf3 100644 --- a/docs/manual/mod/mod_lua.xml.meta +++ b/docs/manual/mod/mod_lua.xml.meta @@ -8,6 +8,6 @@ en - fr + fr
Description:Fournit des points d'entrée Lua dans différentes parties du traitement des requêtes httpd
Statut:Expérimental