diff options
Diffstat (limited to 'docs/url.html')
| -rw-r--r-- | docs/url.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/url.html b/docs/url.html index 6ff673d..e03b094 100644 --- a/docs/url.html +++ b/docs/url.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 | "http://www.w3.org/TR/html4/strict.dtd"> | 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
| 3 | <html> | 3 | <html> |
| 4 | 4 | ||
| 5 | <head> | 5 | <head> |
| 6 | <meta name="description" content="LuaSocket: URL manipulation"> | 6 | <meta name="description" content="LuaSocket: URL manipulation"> |
| 7 | <meta name="keywords" content="Lua, LuaSocket, URL, Library, Link, Network, Support"> | 7 | <meta name="keywords" content="Lua, LuaSocket, URL, Library, Link, Network, Support"> |
| 8 | <title>LuaSocket: URL support</title> | 8 | <title>LuaSocket: URL support</title> |
| 9 | <link rel="stylesheet" href="reference.css" type="text/css"> | 9 | <link rel="stylesheet" href="reference.css" type="text/css"> |
| 10 | </head> | 10 | </head> |
| @@ -28,7 +28,7 @@ | |||
| 28 | <a href="index.html#download">download</a> · | 28 | <a href="index.html#download">download</a> · |
| 29 | <a href="installation.html">installation</a> · | 29 | <a href="installation.html">installation</a> · |
| 30 | <a href="introduction.html">introduction</a> · | 30 | <a href="introduction.html">introduction</a> · |
| 31 | <a href="reference.html">reference</a> | 31 | <a href="reference.html">reference</a> |
| 32 | </p> | 32 | </p> |
| 33 | </center> | 33 | </center> |
| 34 | <hr> | 34 | <hr> |
| @@ -36,21 +36,21 @@ | |||
| 36 | 36 | ||
| 37 | <!-- url ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 37 | <!-- url ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 38 | 38 | ||
| 39 | <h2 id="url">URL</h2> | 39 | <h2 id="url">URL</h2> |
| 40 | 40 | ||
| 41 | <p> | 41 | <p> |
| 42 | The <tt>url</tt> namespace provides functions to parse, protect, | 42 | The <tt>url</tt> namespace provides functions to parse, protect, |
| 43 | and build URLs, as well as functions to compose absolute URLs | 43 | and build URLs, as well as functions to compose absolute URLs |
| 44 | from base and relative URLs, according to | 44 | from base and relative URLs, according to |
| 45 | <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. | 45 | <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. |
| 46 | </p> | 46 | </p> |
| 47 | 47 | ||
| 48 | <p> | 48 | <p> |
| 49 | To obtain the <tt>url</tt> namespace, run: | 49 | To obtain the <tt>url</tt> namespace, run: |
| 50 | </p> | 50 | </p> |
| 51 | 51 | ||
| 52 | <pre class=example> | 52 | <pre class=example> |
| 53 | -- loads the URL module | 53 | -- loads the URL module |
| 54 | local url = require("socket.url") | 54 | local url = require("socket.url") |
| 55 | </pre> | 55 | </pre> |
| 56 | 56 | ||
| @@ -74,7 +74,7 @@ url.<b>absolute(</b>base, relative<b>)</b> | |||
| 74 | </p> | 74 | </p> |
| 75 | 75 | ||
| 76 | <p class=description> | 76 | <p class=description> |
| 77 | Builds an absolute URL from a base URL and a relative URL. | 77 | Builds an absolute URL from a base URL and a relative URL. |
| 78 | </p> | 78 | </p> |
| 79 | 79 | ||
| 80 | <p class=parameters> | 80 | <p class=parameters> |
| @@ -130,14 +130,14 @@ url.<b>build(</b>parsed_url<b>)</b> | |||
| 130 | </p> | 130 | </p> |
| 131 | 131 | ||
| 132 | <p class=description> | 132 | <p class=description> |
| 133 | Rebuilds an URL from its parts. | 133 | Rebuilds an URL from its parts. |
| 134 | </p> | 134 | </p> |
| 135 | 135 | ||
| 136 | <p class=parameters> | 136 | <p class=parameters> |
| 137 | <tt>Parsed_url</tt> is a table with same components returned by | 137 | <tt>Parsed_url</tt> is a table with same components returned by |
| 138 | <a href="#parse"><tt>parse</tt></a>. | 138 | <a href="#parse"><tt>parse</tt></a>. |
| 139 | Lower level components, if specified, | 139 | Lower level components, if specified, |
| 140 | take precedence over high level components of the URL grammar. | 140 | take precedence over high level components of the URL grammar. |
| 141 | </p> | 141 | </p> |
| 142 | 142 | ||
| 143 | <p class=return> | 143 | <p class=return> |
| @@ -152,10 +152,10 @@ url.<b>build_path(</b>segments, unsafe<b>)</b> | |||
| 152 | 152 | ||
| 153 | <p class=description> | 153 | <p class=description> |
| 154 | Builds a <tt><path></tt> component from a list of | 154 | Builds a <tt><path></tt> component from a list of |
| 155 | <tt><segment></tt> parts. | 155 | <tt><segment></tt> parts. |
| 156 | Before composition, any reserved characters found in a segment are escaped into | 156 | Before composition, any reserved characters found in a segment are escaped into |
| 157 | their protected form, so that the resulting path is a valid URL path | 157 | their protected form, so that the resulting path is a valid URL path |
| 158 | component. | 158 | component. |
| 159 | </p> | 159 | </p> |
| 160 | 160 | ||
| 161 | <p class=parameters> | 161 | <p class=parameters> |
| @@ -165,8 +165,8 @@ characters are left untouched. | |||
| 165 | </p> | 165 | </p> |
| 166 | 166 | ||
| 167 | <p class=return> | 167 | <p class=return> |
| 168 | The function returns a string with the | 168 | The function returns a string with the |
| 169 | built <tt><path></tt> component. | 169 | built <tt><path></tt> component. |
| 170 | </p> | 170 | </p> |
| 171 | 171 | ||
| 172 | <!-- escape +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 172 | <!-- escape +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| @@ -178,7 +178,7 @@ url.<b>escape(</b>content<b>)</b> | |||
| 178 | <p class=description> | 178 | <p class=description> |
| 179 | Applies the URL escaping content coding to a string | 179 | Applies the URL escaping content coding to a string |
| 180 | Each byte is encoded as a percent character followed | 180 | Each byte is encoded as a percent character followed |
| 181 | by the two byte hexadecimal representation of its integer | 181 | by the two byte hexadecimal representation of its integer |
| 182 | value. | 182 | value. |
| 183 | </p> | 183 | </p> |
| 184 | 184 | ||
| @@ -270,8 +270,8 @@ url.<b>parse_path(</b>path<b>)</b> | |||
| 270 | </p> | 270 | </p> |
| 271 | 271 | ||
| 272 | <p class=description> | 272 | <p class=description> |
| 273 | Breaks a <tt><path></tt> URL component into all its | 273 | Breaks a <tt><path></tt> URL component into all its |
| 274 | <tt><segment></tt> parts. | 274 | <tt><segment></tt> parts. |
| 275 | </p> | 275 | </p> |
| 276 | 276 | ||
| 277 | <p class=description> | 277 | <p class=description> |
| @@ -282,7 +282,7 @@ Breaks a <tt><path></tt> URL component into all its | |||
| 282 | Since some characters are reserved in URLs, they must be escaped | 282 | Since some characters are reserved in URLs, they must be escaped |
| 283 | whenever present in a <tt><path></tt> component. Therefore, before | 283 | whenever present in a <tt><path></tt> component. Therefore, before |
| 284 | returning a list with all the parsed segments, the function removes | 284 | returning a list with all the parsed segments, the function removes |
| 285 | escaping from all of them. | 285 | escaping from all of them. |
| 286 | </p> | 286 | </p> |
| 287 | 287 | ||
| 288 | <!-- unescape +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 288 | <!-- unescape +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| @@ -300,7 +300,7 @@ Removes the URL escaping content coding from a string. | |||
| 300 | </p> | 300 | </p> |
| 301 | 301 | ||
| 302 | <p class=return> | 302 | <p class=return> |
| 303 | The function returns the decoded string. | 303 | The function returns the decoded string. |
| 304 | </p> | 304 | </p> |
| 305 | 305 | ||
| 306 | <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 306 | <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
