From 453a5207eda52939181233bffffa67171ef838bd Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
The url namespace provides functions to parse, protect, and build URLs, as well as functions to compose absolute URLs -from base and relative URLs, according to +from base and relative URLs, according to RFC 2396.
-+
To obtain the url namespace, run:
--- loads the URL module
+-- loads the URL module
local url = require("socket.url")
@@ -74,7 +74,7 @@ url.absolute(base, relative)
-Builds an absolute URL from a base URL and a relative URL. +Builds an absolute URL from a base URL and a relative URL.
@@ -130,14 +130,14 @@ url.build(parsed_url)
-Rebuilds an URL from its parts. +Rebuilds an URL from its parts.
Parsed_url is a table with same components returned by parse. Lower level components, if specified, -take precedence over high level components of the URL grammar. +take precedence over high level components of the URL grammar.
@@ -152,10 +152,10 @@ url.build_path(segments, unsafe)
Builds a <path> component from a list of -<segment> parts. +<segment> parts. Before composition, any reserved characters found in a segment are escaped into their protected form, so that the resulting path is a valid URL path -component. +component.
@@ -165,8 +165,8 @@ characters are left untouched.
-The function returns a string with the -built <path> component. +The function returns a string with the +built <path> component.
@@ -178,7 +178,7 @@ url.escape(content)Applies the URL escaping content coding to a string Each byte is encoded as a percent character followed -by the two byte hexadecimal representation of its integer +by the two byte hexadecimal representation of its integer value.
@@ -270,8 +270,8 @@ url.parse_path(path)-Breaks a <path> URL component into all its -<segment> parts. +Breaks a <path> URL component into all its +<segment> parts.
@@ -282,7 +282,7 @@ Breaks a <path> URL component into all its Since some characters are reserved in URLs, they must be escaped whenever present in a <path> component. Therefore, before returning a list with all the parsed segments, the function removes -escaping from all of them. +escaping from all of them.
@@ -300,7 +300,7 @@ Removes the URL escaping content coding from a string.-The function returns the decoded string. +The function returns the decoded string.
-- cgit v1.2.3-55-g6feb