aboutsummaryrefslogtreecommitdiff
path: root/doc/http.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/http.html')
-rw-r--r--doc/http.html13
1 files changed, 5 insertions, 8 deletions
diff --git a/doc/http.html b/doc/http.html
index a274aef..66282a4 100644
--- a/doc/http.html
+++ b/doc/http.html
@@ -45,8 +45,7 @@ namespace offers full support for the client side of the HTTP
45protocol (i.e., 45protocol (i.e.,
46the facilities that would be used by a web-browser implementation). The 46the facilities that would be used by a web-browser implementation). The
47implementation conforms to the HTTP/1.1 standard, 47implementation conforms to the HTTP/1.1 standard,
48<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC 48<a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>.
492616</a>.
50</p> 49</p>
51 50
52<p> 51<p>
@@ -67,8 +66,7 @@ local http = require("socket.http")
67 66
68<p> 67<p>
69URLs must conform to 68URLs must conform to
70<a href="http://www.cs.princeton.edu/~diego/rfc/rfc1738.txt">RFC 69<a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a>,
711738</a>,
72that is, an URL is a string in the form: 70that is, an URL is a string in the form:
73</p> 71</p>
74 72
@@ -199,8 +197,7 @@ it usually returns a message body (a web page informing the
199URL was not found or some other useless page). To make sure the 197URL was not found or some other useless page). To make sure the
200operation was successful, check the returned status <tt>code</tt>. For 198operation was successful, check the returned status <tt>code</tt>. For
201a list of the possible values and their meanings, refer to <a 199a list of the possible values and their meanings, refer to <a
202href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC 200href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>.
2032616</a>.
204</p> 201</p>
205 202
206<p class=description> 203<p class=description>
@@ -278,7 +275,7 @@ download and return status "401&nbsp;Authentication Required".
278The HTTP/1.1 standard defines two authentication methods: the Basic 275The HTTP/1.1 standard defines two authentication methods: the Basic
279Authentication Scheme and the Digest Authentication Scheme, both 276Authentication Scheme and the Digest Authentication Scheme, both
280explained in detail in 277explained in detail in
281<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2068.txt">RFC 2068</a>. 278<a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a>.
282</p> 279</p>
283 280
284<p class=note>The Basic Authentication Scheme sends 281<p class=note>The Basic Authentication Scheme sends
@@ -304,7 +301,7 @@ b, c, h = http.request("http://fulano:silva@www.example.com/private/index.html")
304-- the request directly. 301-- the request directly.
305r, c = http.request { 302r, c = http.request {
306 url = "http://www.example.com/private/index.html", 303 url = "http://www.example.com/private/index.html",
307 headers = { authentication = "Basic " .. (mime.b64("fulano:silva")) } 304 headers = { authorization = "Basic " .. (mime.b64("fulano:silva")) }
308} 305}
309</pre> 306</pre>
310 307