mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Added new filter to code.c, to convert between line conventions.
This commit is contained in:
parent
50ce143725
commit
3ea9271126
5
TODO
5
TODO
@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
write some utilities that use the code.lua module and put them
|
||||
in etc, modify the README.etc file and makefile.dist (eol.lua is done)
|
||||
|
||||
check for interrupt compliance
|
||||
add connect with timeout
|
||||
add gethostname and use it in HTTP, SMTP etc, and add manual entry.
|
||||
add thanks for cassino and david burgess
|
||||
|
||||
add local connect, and manual entry
|
||||
|
||||
|
9
etc/eol.lua
Normal file
9
etc/eol.lua
Normal file
@ -0,0 +1,9 @@
|
||||
marker = {['-u'] = '\10', ['-d'] = '\13\10'}
|
||||
arg = arg or {'-u'}
|
||||
marker = marker[arg[1]] or marker['-u']
|
||||
local convert = socket.code.canonic(marker)
|
||||
while 1 do
|
||||
local chunk = io.read(4096)
|
||||
io.write(convert(chunk))
|
||||
if not chunk then break end
|
||||
end
|
@ -419,7 +419,7 @@ end
|
||||
-----------------------------------------------------------------------------
|
||||
local function authorize(reqt, parsed, respt)
|
||||
reqt.headers["authorization"] = "Basic " ..
|
||||
socket.code.base64.encode(parsed.user .. ":" .. parsed.password)
|
||||
(socket.code.b64(parsed.user .. ":" .. parsed.password))
|
||||
local autht = {
|
||||
nredirects = reqt.nredirects,
|
||||
method = reqt.method,
|
||||
|
@ -216,8 +216,7 @@ io.write("testing manual basic auth: ")
|
||||
request = {
|
||||
url = "http://" .. host .. prefix .. "/auth/index.html",
|
||||
headers = {
|
||||
authorization = "Basic " ..
|
||||
socket.code.base64.encode("luasocket:password")
|
||||
authorization = "Basic " .. (socket.code.b64("luasocket:password"))
|
||||
}
|
||||
}
|
||||
expect = {
|
||||
|
Loading…
Reference in New Issue
Block a user