-
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
if you connect to a lua-http server and send it unix newlines (which I'm aware is invalid), it will throw with a somewhat cryptic error, rather than returning an error value or tolerating it.
reproduction:
local http_server = require "http.server"
local server = assert(http_server.listen {
host = "127.0.0.1",
port = 8080,
onstream = function(server, stream)
local headers = stream:get_headers()
if headers then
stream:write_body_from_string("hello, world!")
end
end,
})
assert(server:loop())printf 'GET / HTTP/1.1\n\n' | nc localhost 8080lua: repro.lua:13: /usr/local/share/lua/5.4/http/server.lua:182: get_next_incoming_stream: fill: Invalid or incomplete multibyte or wide character
stack traceback:
[C]: in function 'assert'
repro.lua:13: in main chunk
[C]: in ?
Metadata
Metadata
Assignees
Labels
No labels