aboutsummaryrefslogtreecommitdiff
path: root/src/http.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.lua')
-rw-r--r--src/http.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http.lua b/src/http.lua
index dce3ac8..9543d59 100644
--- a/src/http.lua
+++ b/src/http.lua
@@ -8,7 +8,7 @@
8----------------------------------------------------------------------------- 8-----------------------------------------------------------------------------
9 9
10local Public, Private = {}, {} 10local Public, Private = {}, {}
11HTTP = Public 11http = Public
12 12
13----------------------------------------------------------------------------- 13-----------------------------------------------------------------------------
14-- Program constants 14-- Program constants
@@ -195,7 +195,7 @@ end
195function Private.receivebody_bylength(sock, length, receive_cb) 195function Private.receivebody_bylength(sock, length, receive_cb)
196 local uerr, go 196 local uerr, go
197 while length > 0 do 197 while length > 0 do
198 local size = min(Public.BLOCKSIZE, length) 198 local size = math.min(Public.BLOCKSIZE, length)
199 local chunk, err = sock:receive(size) 199 local chunk, err = sock:receive(size)
200 if err then 200 if err then
201 go, uerr = receive_cb(nil, err) 201 go, uerr = receive_cb(nil, err)
@@ -542,7 +542,7 @@ function Public.request_cb(request, response)
542 scheme = "http" 542 scheme = "http"
543 }) 543 })
544 if parsed.scheme ~= "http" then 544 if parsed.scheme ~= "http" then
545 response.error = format("unknown scheme '%s'", parsed.scheme) 545 response.error = string.format("unknown scheme '%s'", parsed.scheme)
546 return response 546 return response
547 end 547 end
548 -- explicit authentication info overrides that given by the URL 548 -- explicit authentication info overrides that given by the URL